Files
quickbook/test/code-block-cpp.gold
Daniel James 4713c1e211 Quickbook: Escapes in syntax highlighted comments.
Not great since it closes the comments around the escaped code. But to
nest it properly will require a bigger change. Would also be nice to
deal with escape in other contexts - such as strings.

[SVN r71098]
2011-04-08 00:09:59 +00:00

30 lines
1.4 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
<article id="c___code_blocks" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
xmlns:xi="http://www.w3.org/2001/XInclude">
<title>C++ Code Blocks</title>
<programlisting><phrase role="comment">// No escape</phrase>
<phrase role="comment">/* No escape */</phrase>
<phrase role="comment">/* No escape
* with newlines
*/</phrase>
<phrase role="comment">// In Header: &lt;</phrase><ulink url="boost:/boost/optional/optional.hpp">boost/optional/optional.hpp</ulink><phrase role="comment">&gt;</phrase>
<phrase role="comment">/* In Header: &lt;</phrase><ulink url="boost:/boost/optional/optional.hpp">boost/optional/optional.hpp</ulink><phrase role="comment">&gt; */</phrase>
<phrase role="comment">/* Multiple escapes: </phrase><emphasis>italic</emphasis><phrase role="comment">
* </phrase><emphasis role="underline">underline</emphasis><emphasis role="bold">bold</emphasis><phrase role="comment">
*/</phrase>
</programlisting>
<para>
A badly formed comment:
</para>
<programlisting><phrase role="comment">/* Oh dear
</phrase></programlisting>
<para>
A badly formed comment with an escape:
</para>
<programlisting><phrase role="comment">/* Oh dear </phrase><emphasis role="bold">bold</emphasis><phrase role="comment">
</phrase></programlisting>
</article>