aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2014-07-11 15:52:38 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2014-07-11 15:54:21 -0700
commit7654db9df1b68926371da2a1f23db6df93056f44 (patch)
tree65e8dcc253e38c748c1dcb3f73747f432ca439ea /src/Text/Pandoc
parent05a5b4e3c2aa53fa9c12464791d3a4969b18daba (diff)
downloadpandoc-7654db9df1b68926371da2a1f23db6df93056f44.tar.gz
Markdown writer: don't use braced attributes for fenced code.
Removed `Ext_fenced_code_attributes` from `markdown_github` extensions. If this extension is not set, the first class attribute will be printed after the opening fence as a bare word. Closes #1416.
Diffstat (limited to 'src/Text/Pandoc')
-rw-r--r--src/Text/Pandoc/Options.hs1
-rw-r--r--src/Text/Pandoc/Writers/Markdown.hs4
2 files changed, 2 insertions, 3 deletions
diff --git a/src/Text/Pandoc/Options.hs b/src/Text/Pandoc/Options.hs
index b7a3a4b7b..8580a6914 100644
--- a/src/Text/Pandoc/Options.hs
+++ b/src/Text/Pandoc/Options.hs
@@ -163,7 +163,6 @@ githubMarkdownExtensions = Set.fromList
, Ext_raw_html
, Ext_tex_math_single_backslash
, Ext_fenced_code_blocks
- , Ext_fenced_code_attributes
, Ext_auto_identifiers
, Ext_ascii_identifiers
, Ext_backtick_code_blocks
diff --git a/src/Text/Pandoc/Writers/Markdown.hs b/src/Text/Pandoc/Writers/Markdown.hs
index a67271a5d..78500d498 100644
--- a/src/Text/Pandoc/Writers/Markdown.hs
+++ b/src/Text/Pandoc/Writers/Markdown.hs
@@ -405,8 +405,8 @@ blockToMarkdown opts (CodeBlock attribs str) = return $
attrs = if isEnabled Ext_fenced_code_attributes opts
then nowrap $ " " <> attrsToMarkdown attribs
else case attribs of
- (_,[cls],_) -> " " <> text cls
- _ -> empty
+ (_,(cls:_),_) -> " " <> text cls
+ _ -> empty
blockToMarkdown opts (BlockQuote blocks) = do
st <- get
-- if we're writing literate haskell, put a space before the bird tracks