Changed representation of code blocks to use <screen> and
escaped characters rather than <programlisting> and CDATA. Reason: XML source more easily editable and readable. git-svn-id: https://pandoc.googlecode.com/svn/trunk@393 788f1e2b-df1e-0410-8736-df70ead52e1b
This commit is contained in:
parent
ae869a092a
commit
2716943855
2 changed files with 26 additions and 12 deletions
|
@ -158,7 +158,7 @@ blockToDocbook options (Para lst) =
|
|||
blockToDocbook options (BlockQuote blocks) =
|
||||
indentedInTags options "blockquote" (blocksToDocbook options blocks)
|
||||
blockToDocbook options (CodeBlock str) =
|
||||
text "<programlisting>" <> (cdata str) <> text "</programlisting>"
|
||||
text "<screen>\n" <> text (codeStringToXML str) <> text "\n</screen>"
|
||||
blockToDocbook options (BulletList lst) =
|
||||
indentedInTags options "itemizedlist" $ listItemsToDocbook options lst
|
||||
blockToDocbook options (OrderedList lst) =
|
||||
|
|
|
@ -87,9 +87,11 @@
|
|||
<para>
|
||||
Code in a block quote:
|
||||
</para>
|
||||
<programlisting><![CDATA[sub status {
|
||||
<screen>
|
||||
sub status {
|
||||
print "working";
|
||||
}]]></programlisting>
|
||||
}
|
||||
</screen>
|
||||
<para>
|
||||
A list:
|
||||
</para>
|
||||
|
@ -129,9 +131,11 @@
|
|||
<para>
|
||||
Example:
|
||||
</para>
|
||||
<programlisting><![CDATA[sub status {
|
||||
<screen>
|
||||
sub status {
|
||||
print "working";
|
||||
}]]></programlisting>
|
||||
}
|
||||
</screen>
|
||||
</blockquote>
|
||||
<blockquote>
|
||||
<orderedlist>
|
||||
|
@ -169,19 +173,23 @@
|
|||
<para>
|
||||
Code:
|
||||
</para>
|
||||
<programlisting><![CDATA[---- (should be four hyphens)
|
||||
<screen>
|
||||
---- (should be four hyphens)
|
||||
|
||||
sub status {
|
||||
print "working";
|
||||
}
|
||||
|
||||
this code block is indented by one tab]]></programlisting>
|
||||
this code block is indented by one tab
|
||||
</screen>
|
||||
<para>
|
||||
And:
|
||||
</para>
|
||||
<programlisting><![CDATA[ this code block is indented by two tabs
|
||||
<screen>
|
||||
this code block is indented by two tabs
|
||||
|
||||
These should not be escaped: \$ \\ \> \[ \{]]></programlisting>
|
||||
These should not be escaped: \$ \\ \> \[ \{
|
||||
</screen>
|
||||
</section>
|
||||
<section>
|
||||
<title>Lists</title>
|
||||
|
@ -839,7 +847,9 @@ Cat & 1 \\ \hline
|
|||
<para>
|
||||
This should [not][] be a link.
|
||||
</para>
|
||||
<programlisting><![CDATA[[not]: /url]]></programlisting>
|
||||
<screen>
|
||||
[not]: /url
|
||||
</screen>
|
||||
<para>
|
||||
Foo <ulink url="/url/">bar</ulink>.
|
||||
</para>
|
||||
|
@ -901,7 +911,9 @@ Cat & 1 \\ \hline
|
|||
Auto-links should not occur here:
|
||||
<literal><http://example.com/></literal>
|
||||
</para>
|
||||
<programlisting><![CDATA[or here: <http://example.com/>]]></programlisting>
|
||||
<screen>
|
||||
or here: <http://example.com/>
|
||||
</screen>
|
||||
</section>
|
||||
</section>
|
||||
<section>
|
||||
|
@ -950,7 +962,9 @@ Cat & 1 \\ \hline
|
|||
Subsequent blocks are indented to show that they belong to the
|
||||
footnote (as with list items).
|
||||
</para>
|
||||
<programlisting><![CDATA[ { <code> }]]></programlisting>
|
||||
<screen>
|
||||
{ <code> }
|
||||
</screen>
|
||||
<para>
|
||||
If you want, you can indent every line, but you can also be lazy
|
||||
and just indent the first line of each block.
|
||||
|
|
Loading…
Reference in a new issue