aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2013-03-11 20:45:27 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2013-03-11 20:45:27 -0700
commit54782c2af68c1b80d69ee028e74dd5ed17c0a934 (patch)
tree1270692e6a1a81ecd2aaaf332881f4c284ea578a
parentf7229b147314042f946dfded3b441ab0fae260a0 (diff)
downloadpandoc-54782c2af68c1b80d69ee028e74dd5ed17c0a934.tar.gz
Fixed spacing bugs involving code block attributes.
Closes #763.
-rw-r--r--src/Text/Pandoc/Readers/RST.hs2
-rw-r--r--src/Text/Pandoc/Writers/Markdown.hs2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/Text/Pandoc/Readers/RST.hs b/src/Text/Pandoc/Readers/RST.hs
index 378e49703..9bd832d14 100644
--- a/src/Text/Pandoc/Readers/RST.hs
+++ b/src/Text/Pandoc/Readers/RST.hs
@@ -611,7 +611,7 @@ codeblock numberLines lang body =
kvs = case numberLines of
Just "" -> []
Nothing -> []
- Just n -> [("startFrom",n)]
+ Just n -> [("startFrom",trim n)]
---
--- note block
diff --git a/src/Text/Pandoc/Writers/Markdown.hs b/src/Text/Pandoc/Writers/Markdown.hs
index c19cad22b..876485552 100644
--- a/src/Text/Pandoc/Writers/Markdown.hs
+++ b/src/Text/Pandoc/Writers/Markdown.hs
@@ -328,7 +328,7 @@ blockToMarkdown opts (CodeBlock attribs str) = return $
| otherwise -> replicate (n+1) '~'
backticks = text "```"
attrs = if isEnabled Ext_fenced_code_attributes opts
- then attrsToMarkdown attribs
+ then nowrap $ attrsToMarkdown attribs
else empty
blockToMarkdown opts (BlockQuote blocks) = do
st <- get