Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 479F31337B2F for ; Wed, 13 Apr 2011 12:02:46 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 73153-07 for ; Wed, 13 Apr 2011 15:02:05 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id CFEA81337B67 for ; Wed, 13 Apr 2011 12:02:04 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id p3DF22Ju004948; Wed, 13 Apr 2011 11:02:02 -0400 (EDT) To: Daniele Varrazzo cc: pgsql-docs@postgresql.org Subject: Re: Proposal: syntax highlight in html manual In-reply-to: References: Comments: In-reply-to Daniele Varrazzo message dated "Wed, 13 Apr 2011 11:31:45 +0100" Date: Wed, 13 Apr 2011 11:02:02 -0400 Message-ID: <4947.1302706922@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-5 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201104/68 X-Sequence-Number: 6639 Daniele Varrazzo writes: > when I wrote the docs for the GMP extension > (http://pgmp.projects.postgresql.org/) I started improving the syntax > highlight produced by pygments > (https://bitbucket.org/dvarrazzo/pygments-postgres) for the PostgreSQL > SQL dialect. I've also added specific lexers for PL/pgSQL and > interactive psql sessions. The lexer handles all the PG constructs, > has a list of keywords and datatypes parsed from the docs, and can > also dispatch the content of a $$ string to a different lexer based on > a related LANGUAGE keyword nearby (e.g. highlighting a PL/Python > function using the Python lexer). Here you can see the result on the > "regression document" I am using to develop the lexer: > - http://pgmp.projects.postgresql.org/highlight/psql.html > - http://pgmp.projects.postgresql.org/highlight/postgres.html > Is there any interest in applying highlighted syntax to the html > rendering of the manual? FWIW, there are very few things in the world that I hate more than randomly multicolored text. Almost always, some of it is unreadable in a particular viewing context because of poor contrast. And as often as not, the stuff that does stand out isn't the most important parts of the text. So no, this isn't a direction I want to see the Postgres documentation take. regards, tom lane