mirror of
https://github.com/boostorg/quickbook.git
synced 2026-01-26 06:42:27 +00:00
Use a phrase with an id inside the header. Using an anchor before the heading was causing problems when the heading wasn't inside a section. We can't use an anchor inside the header when it links to itself, as it messes up getting the title for the link. Using an empty phrase means that it will just get the empty title for the phrase. Thanks to John Maddock for the idea. This does generate slightly odd markup. We could possibly use the old style markup whenever section depth > 0, since we would know that we're inside a section, but that seems like an unnecessary complication. [SVN r74346]
43 lines
1.2 KiB
XML
43 lines
1.2 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="indented_code_blocks" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
|
|
xmlns:xi="http://www.w3.org/2001/XInclude">
|
|
<title>Indented code blocks</title>
|
|
<para>
|
|
In a paragraph. Still in a paragraph.
|
|
</para>
|
|
|
|
<programlisting>In a code block.
|
|
</programlisting>
|
|
<para>
|
|
Back in a paragraph.
|
|
</para>
|
|
|
|
<programlisting> Code block line 1.
|
|
Code block line 2.
|
|
Code block line 3.
|
|
</programlisting>
|
|
<para>
|
|
Paragraph.
|
|
</para>
|
|
|
|
<programlisting>Code block with no trailing blank lines.
|
|
</programlisting>
|
|
<para>
|
|
Paragraph.
|
|
</para>
|
|
<bridgehead renderas="sect2" id="indented_code_blocks.h0">
|
|
<phrase id="indented_code_blocks.code_blocks_separated_by_comment"/><link linkend="indented_code_blocks.code_blocks_separated_by_comment">Code
|
|
blocks separated by comment</link>
|
|
</bridgehead>
|
|
|
|
<programlisting>First code block.
|
|
</programlisting>
|
|
|
|
<programlisting>Second code block.
|
|
[/ Comment in second code block]
|
|
Still second code block.
|
|
[/ Comment trailing second code block]
|
|
</programlisting>
|
|
</article>
|