svn: /phd/trunk/docs/phd-guide/ phd-guide.xml

From: Date: Fri, 27 Aug 2010 05:15:03 +0000
Subject: svn: /phd/trunk/docs/phd-guide/ phd-guide.xml
Groups: php.doc.cvs 
Request: Send a blank email to doc-cvs+get-7048@lists.php.net to get a copy of this message
cweiske Fri, 27 Aug 2010 05:15:03 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=302840 Log: tell about programlisting roles Changed paths: U phd/trunk/docs/phd-guide/phd-guide.xml Modified: phd/trunk/docs/phd-guide/phd-guide.xml =================================================================== --- phd/trunk/docs/phd-guide/phd-guide.xml 2010-08-27 03:59:38 UTC (rev 302839) +++ phd/trunk/docs/phd-guide/phd-guide.xml 2010-08-27 05:15:03 UTC (rev 302840) @@ -303,6 +303,27 @@ is source code examples. PhD is able to colorize the source code of many types.</para> + <para>To utilize syntax highlighting, your opening + <literal>&lt;programlisting&gt;</literal> tags need a + <literal>role</literal> attribute describing the type + of source code. Examples are <literal>php</literal>, + <literal>html</literal> and <literal>python</literal>.</para> + + <note> + <para>PhD currently only highlights the code if it is embedded + in a <literal>CDATA</literal> section.</para> + </note> + + <example> + <title>A programlisting tag with a role</title> + <programlisting role="xml"><![CDATA[<programlisting role="php"><![CDATA[ +<?php +echo "Hello world!"; +?> +]]>]]&gt;&lt;/programlisting&gt; + </programlisting> + </example> + <para>By default, PhD uses the source code highlighter that is built into PHP itself. It is only able to highlight PHP code and nothing else.</para>

« previous php.doc.cvs (#7048) next »