git.iko.soy/typeable/pandoc
on master help sign in
Textile writer: Don't escape code in bc. block.
commit16d43664318c0ccd84bdc0334ab8048df2fc0ec4 authorJohn MacFarlane <jgm@berkeley.edu> dateSun 23 Jan 2011, 09:44 (16 years ago) parent38013de
2 files changed+9−9
src/Text/Pandoc/Writers/Textile.hs+1−1 tests/writer.textile+8−8
src/Text/Pandoc/Writers/Textile.hs+1−1
@@ -126,7 +126,7 @@ blockToTextile _ (CodeBlock (_,classes,_) str) | any (all isSpace) (lines str) =
126126 else " class=\"" ++ unwords classes ++ "\""
127127
128128blockToTextile _ (CodeBlock (_,classes,_) str) =
129− return $ "bc" ++ classes' ++ ". " ++ escapeStringForXML str ++ "\n"
129+ return $ "bc" ++ classes' ++ ". " ++ str ++ "\n"
130130 where classes' = if null classes
131131 then ""
132132 else "(" ++ unwords classes ++ ")"
tests/writer.textile+8−8
@@ -50,7 +50,7 @@ bq. This is a block quote. It is pretty short.
5050Code in a block quote:
5151
5252bc. sub status {
53− print &quot;working&quot;;
53+ print "working";
5454}
5555
5656A list:
@@ -366,13 +366,13 @@ foo
366366
367367This should be a code block, though:
368368
369−bc. &lt;div&gt;
369+bc. <div>
370370 foo
371−&lt;/div&gt;
371+</div>
372372
373373As should this:
374374
375−bc. &lt;div&gt;foo&lt;/div&gt;
375+bc. <div>foo</div>
376376
377377Now, nested:
378378
@@ -402,7 +402,7 @@ Blah
402402
403403Code block:
404404
405−bc. &lt;!-- Comment --&gt;
405+bc. <!-- Comment -->
406406
407407Just plain comment, with trailing spaces on the line:
408408
@@ -410,7 +410,7 @@ Just plain comment, with trailing spaces on the line:
410410
411411Code:
412412
413−bc. &lt;hr /&gt;
413+bc. <hr />
414414
415415Hr's:
416416
@@ -632,7 +632,7 @@ bq. Blockquoted: "http://example.com/":http://example.com/
632632
633633Auto-links should not occur here: @<http://example.com/>@
634634
635−bc. or here: &lt;http://example.com/&gt;
635+bc. or here: <http://example.com/>
636636
637637<hr />
638638
@@ -665,7 +665,7 @@ fn2. Here's the long note. This one contains multiple blocks.
665665
666666Subsequent blocks are indented to show that they belong to the footnote (as with list items).
667667
668−bc. { &lt;code&gt; }
668+bc. { <code> }
669669
670670If you want, you can indent every line, but you can also be lazy and just indent the first line of each block.
671671