diff options
| author | Jan-Otto Kröpke <mail@jkroepke.de> | 2019-08-08 23:08:46 +0200 | 
|---|---|---|
| committer | Albert Krewinkel <albert+github@zeitkraut.de> | 2019-08-11 21:57:12 +0200 | 
| commit | a0a41c7a8e4e385450c55459b9a01a59755766d2 (patch) | |
| tree | d7699f61e5fd63eb6881b521455164720f249218 | |
| parent | e53c952997be5f14196bb2ff95f790daba066bcb (diff) | |
| download | pandoc-a0a41c7a8e4e385450c55459b9a01a59755766d2.tar.gz | |
JIRA writer: Remove escapeStringForJira for code blocks
| -rw-r--r-- | src/Text/Pandoc/Writers/Jira.hs | 4 | ||||
| -rw-r--r-- | test/writer.jira | 32 | 
2 files changed, 18 insertions, 18 deletions
| diff --git a/src/Text/Pandoc/Writers/Jira.hs b/src/Text/Pandoc/Writers/Jira.hs index fe66d874d..b0caf82f7 100644 --- a/src/Text/Pandoc/Writers/Jira.hs +++ b/src/Text/Pandoc/Writers/Jira.hs @@ -144,7 +144,7 @@ blockToJira _ (CodeBlock attr@(_,classes,_) str) = do    let anchorMacro = anchor attr    appendNewlineUnlessInList . T.intercalate "\n" $      (if anchorMacro == "" then id else (anchorMacro :)) -    [start, escapeStringForJira (pack str), "{code}"] +    [start, pack str, "{code}"]  blockToJira opts (BlockQuote [p@(Para _)]) = do    contents <- blockToJira opts p @@ -270,7 +270,7 @@ inlineToJira opts (Quoted DoubleQuote lst) = do  inlineToJira opts (Cite _  lst) = inlineListToJira opts lst  inlineToJira _ (Code attr str) = -  return (anchor attr <> "{{" <> escapeStringForJira (pack str) <> "}}") +  return (anchor attr <> "{{" <> pack str <> "}}")  inlineToJira _ (Str str) = return $ escapeStringForJira (pack str) diff --git a/test/writer.jira b/test/writer.jira index 7d9766c1e..16e1fcab8 100644 --- a/test/writer.jira +++ b/test/writer.jira @@ -50,8 +50,8 @@ bq. This is a block quote. It is pretty short.  Code in a block quote:  {code} -sub status \{ -    print "working"; +sub status { +    print "working";  }  {code} @@ -81,10 +81,10 @@ h1. {anchor:code-blocks}Code Blocks  Code:  {code} -‐‐‐‐ (should be four hyphens) +---- (should be four hyphens) -sub status \{ -    print "working"; +sub status { +    print "working";  }  this code block is indented by one tab @@ -95,7 +95,7 @@ And:  {code}      this code block is indented by two tabs -These should not be escaped:  \$ \\ \> \[ \\{ +These should not be escaped:  \$ \\ \> \[ \{  {code}  ---- @@ -272,7 +272,7 @@ contains seeds, crisp, pleasant to taste  * *_orange_*  orange fruit  {code} -\{ orange code block } +{ orange code block }  {code}  bq. orange block quote @@ -334,15 +334,15 @@ foo  This should be a code block, though:  {code} -<div> +<div>      foo -</div> +</div>  {code}  As should this:  {code} -<div>foo</div> +<div>foo</div>  {code}  Now, nested: @@ -358,7 +358,7 @@ Multiline:  Code block:  {code} -<!‐‐ Comment ‐‐> +<!-- Comment -->  {code}  Just plain comment, with trailing spaces on the line: @@ -367,7 +367,7 @@ Just plain comment, with trailing spaces on the line:  Code:  {code} -<hr /> +<hr />  {code}  Hr's: @@ -399,7 +399,7 @@ So is *_this_* word.  So is *_this_* word. -This is code: {{>}}, {{$}}, {{\}}, {{\$}}, {{<html>}}. +This is code: {{>}}, {{$}}, {{\}}, {{\$}}, {{<html>}}.  -This is _strikeout_.- @@ -577,10 +577,10 @@ An e‐mail address: [nobody@nowhere.net|mailto:nobody@nowhere.net]  bq. Blockquoted: [http://example.com/|http://example.com/] -Auto‐links should not occur here: {{<http://example.com/>}} +Auto‐links should not occur here: {{<http://example.com/>}}  {code} -or here: <http://example.com/> +or here: <http://example.com/>  {code}  ---- @@ -615,7 +615,7 @@ This paragraph should not be part of the note, as it is not indented.  Subsequent blocks are indented to show that they belong to the footnote (as with list items).  {code} -  \{ <code> } +  { <code> }  {code}  If you want, you can indent every line, but you can also be lazy and just indent the first line of each block. | 
