git.iko.soy/typeable/pandoc
on master help sign in
JIRA writer: Remove escapeStringForJira for code blocks
a0a41c7Jan-Otto Kröpke
src/Text/Pandoc/Writers/Jira.hs+2−2
@@ -144,7 +144,7 @@ blockToJira _ (CodeBlock attr@(_,classes,_) str) = do
144 let anchorMacro = anchor attr
144 let anchorMacro = anchor attr
145 appendNewlineUnlessInList . T.intercalate "\n" $
145 appendNewlineUnlessInList . T.intercalate "\n" $
146 (if anchorMacro == "" then id else (anchorMacro :))
146 (if anchorMacro == "" then id else (anchorMacro :))
147− [start, escapeStringForJira (pack str), "{code}"]
147+ [start, pack str, "{code}"]
148
148
149blockToJira opts (BlockQuote [p@(Para _)]) = do
149blockToJira opts (BlockQuote [p@(Para _)]) = do
150 contents <- blockToJira opts p
150 contents <- blockToJira opts p
@@ -270,7 +270,7 @@ inlineToJira opts (Quoted DoubleQuote lst) = do
270inlineToJira opts (Cite _ lst) = inlineListToJira opts lst
270inlineToJira opts (Cite _ lst) = inlineListToJira opts lst
271
271
272inlineToJira _ (Code attr str) =
272inlineToJira _ (Code attr str) =
273− return (anchor attr <> "{{" <> escapeStringForJira (pack str) <> "}}")
273+ return (anchor attr <> "{{" <> pack str <> "}}")
274
274
275inlineToJira _ (Str str) = return $ escapeStringForJira (pack str)
275inlineToJira _ (Str str) = return $ escapeStringForJira (pack str)
276
276
test/writer.jira+16−16
@@ -50,8 +50,8 @@ bq. This is a block quote. It is pretty short.
50Code in a block quote:
50Code in a block quote:
51
51
52{code}
52{code}
53−sub status \{
53+sub status {
54− print &quot;working&quot;;
54+ print "working";
55}
55}
56{code}
56{code}
57
57
@@ -81,10 +81,10 @@ h1. {anchor:code-blocks}Code Blocks
81Code:
81Code:
82
82
83{code}
83{code}
84−&hyphen;&hyphen;&hyphen;&hyphen; (should be four hyphens)
84+---- (should be four hyphens)
85
85
86−sub status \{
86+sub status {
87− print &quot;working&quot;;
87+ print "working";
88}
88}
89
89
90this code block is indented by one tab
90this code block is indented by one tab
@@ -95,7 +95,7 @@ And:
95{code}
95{code}
96 this code block is indented by two tabs
96 this code block is indented by two tabs
97
97
98−These should not be escaped: \$ \\ \&gt; \[ \\{
98+These should not be escaped: \$ \\ \> \[ \{
99{code}
99{code}
100
100
101----
101----
@@ -272,7 +272,7 @@ contains seeds, crisp, pleasant to taste
272* *_orange_*
272* *_orange_*
273orange fruit
273orange fruit
274{code}
274{code}
275−\{ orange code block }
275+{ orange code block }
276{code}
276{code}
277bq. orange block quote
277bq. orange block quote
278
278
@@ -334,15 +334,15 @@ foo
334This should be a code block, though:
334This should be a code block, though:
335
335
336{code}
336{code}
337−&lt;div&gt;
337+<div>
338 foo
338 foo
339−&lt;/div&gt;
339+</div>
340{code}
340{code}
341
341
342As should this:
342As should this:
343
343
344{code}
344{code}
345−&lt;div&gt;foo&lt;/div&gt;
345+<div>foo</div>
346{code}
346{code}
347
347
348Now, nested:
348Now, nested:
@@ -358,7 +358,7 @@ Multiline:
358Code block:
358Code block:
359
359
360{code}
360{code}
361−&lt;!&hyphen;&hyphen; Comment &hyphen;&hyphen;&gt;
361+<!-- Comment -->
362{code}
362{code}
363
363
364Just plain comment, with trailing spaces on the line:
364Just plain comment, with trailing spaces on the line:
@@ -367,7 +367,7 @@ Just plain comment, with trailing spaces on the line:
367Code:
367Code:
368
368
369{code}
369{code}
370−&lt;hr /&gt;
370+<hr />
371{code}
371{code}
372
372
373Hr's:
373Hr's:
@@ -399,7 +399,7 @@ So is *_this_* word.
399
399
400So is *_this_* word.
400So is *_this_* word.
401
401
402−This is code: {{&gt;}}, {{$}}, {{\}}, {{\$}}, {{&lt;html&gt;}}.
402+This is code: {{>}}, {{$}}, {{\}}, {{\$}}, {{<html>}}.
403
403
404-This is _strikeout_.-
404-This is _strikeout_.-
405
405
@@ -577,10 +577,10 @@ An e&hyphen;mail address: [nobody&commat;nowhere.net|mailto:nobody@nowhere.net]
577bq. Blockquoted: [http://example.com/|http://example.com/]
577bq. Blockquoted: [http://example.com/|http://example.com/]
578
578
579
579
580−Auto&hyphen;links should not occur here: {{&lt;http://example.com/&gt;}}
580+Auto&hyphen;links should not occur here: {{<http://example.com/>}}
581
581
582{code}
582{code}
583−or here: &lt;http://example.com/&gt;
583+or here: <http://example.com/>
584{code}
584{code}
585
585
586----
586----
@@ -615,7 +615,7 @@ This paragraph should not be part of the note, as it is not indented.
615Subsequent blocks are indented to show that they belong to the footnote (as with list items).
615Subsequent blocks are indented to show that they belong to the footnote (as with list items).
616
616
617{code}
617{code}
618− \{ &lt;code&gt; }
618+ { <code> }
619{code}
619{code}
620
620
621If you want, you can indent every line, but you can also be lazy and just indent the first line of each block.
621If you want, you can indent every line, but you can also be lazy and just indent the first line of each block.