git.iko.soy/typeable/pandoc
on master help sign in
Markdown writer: don't use braced attributes for fenced code.
7654db9John MacFarlane
README+1−1
@@ -2634,7 +2634,7 @@ variants are supported:
2634
2634
2635`markdown_github` (Github-flavored Markdown)
2635`markdown_github` (Github-flavored Markdown)
2636: `pipe_tables`, `raw_html`, `tex_math_single_backslash`,
2636: `pipe_tables`, `raw_html`, `tex_math_single_backslash`,
2637− `fenced_code_blocks`, `fenced_code_attributes`, `auto_identifiers`,
2637+ `fenced_code_blocks`, `auto_identifiers`,
2638 `ascii_identifiers`, `backtick_code_blocks`, `autolink_bare_uris`,
2638 `ascii_identifiers`, `backtick_code_blocks`, `autolink_bare_uris`,
2639 `intraword_underscores`, `strikeout`, `hard_line_breaks`
2639 `intraword_underscores`, `strikeout`, `hard_line_breaks`
2640
2640
src/Text/Pandoc/Options.hs−1
@@ -163,7 +163,6 @@ githubMarkdownExtensions = Set.fromList
163 , Ext_raw_html
163 , Ext_raw_html
164 , Ext_tex_math_single_backslash
164 , Ext_tex_math_single_backslash
165 , Ext_fenced_code_blocks
165 , Ext_fenced_code_blocks
166− , Ext_fenced_code_attributes
167 , Ext_auto_identifiers
166 , Ext_auto_identifiers
168 , Ext_ascii_identifiers
167 , Ext_ascii_identifiers
169 , Ext_backtick_code_blocks
168 , Ext_backtick_code_blocks
src/Text/Pandoc/Writers/Markdown.hs+2−2
@@ -405,8 +405,8 @@ blockToMarkdown opts (CodeBlock attribs str) = return $
405 attrs = if isEnabled Ext_fenced_code_attributes opts
405 attrs = if isEnabled Ext_fenced_code_attributes opts
406 then nowrap $ " " <> attrsToMarkdown attribs
406 then nowrap $ " " <> attrsToMarkdown attribs
407 else case attribs of
407 else case attribs of
408− (_,[cls],_) -> " " <> text cls
408+ (_,(cls:_),_) -> " " <> text cls
409− _ -> empty
409+ _ -> empty
410blockToMarkdown opts (BlockQuote blocks) = do
410blockToMarkdown opts (BlockQuote blocks) = do
411 st <- get
411 st <- get
412 -- if we're writing literate haskell, put a space before the bird tracks
412 -- if we're writing literate haskell, put a space before the bird tracks