git.iko.soy/typeable/pandoc
on master help sign in
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.

commit7654db9df1b68926371da2a1f23db6df93056f44 authorJohn MacFarlane <jgm@berkeley.edu> dateFri 11 Jul 2014, 15:52 (12 years ago) parent05a5b4e
3 files changed+3−4
README+1−1 src/Text/Pandoc/Options.hs−1 src/Text/Pandoc/Writers/Markdown.hs+2−2
README+1−1
@@ -2634,7 +2634,7 @@ variants are supported:
26342634
26352635`markdown_github` (Github-flavored Markdown)
26362636: `pipe_tables`, `raw_html`, `tex_math_single_backslash`,
2637− `fenced_code_blocks`, `fenced_code_attributes`, `auto_identifiers`,
2637+ `fenced_code_blocks`, `auto_identifiers`,
26382638 `ascii_identifiers`, `backtick_code_blocks`, `autolink_bare_uris`,
26392639 `intraword_underscores`, `strikeout`, `hard_line_breaks`
26402640
src/Text/Pandoc/Options.hs−1
@@ -163,7 +163,6 @@ githubMarkdownExtensions = Set.fromList
163163 , Ext_raw_html
164164 , Ext_tex_math_single_backslash
165165 , Ext_fenced_code_blocks
166− , Ext_fenced_code_attributes
167166 , Ext_auto_identifiers
168167 , Ext_ascii_identifiers
169168 , Ext_backtick_code_blocks
src/Text/Pandoc/Writers/Markdown.hs+2−2
@@ -405,8 +405,8 @@ blockToMarkdown opts (CodeBlock attribs str) = return $
405405 attrs = if isEnabled Ext_fenced_code_attributes opts
406406 then nowrap $ " " <> attrsToMarkdown attribs
407407 else case attribs of
408− (_,[cls],_) -> " " <> text cls
409− _ -> empty
408+ (_,(cls:_),_) -> " " <> text cls
409+ _ -> empty
410410blockToMarkdown opts (BlockQuote blocks) = do
411411 st <- get
412412 -- if we're writing literate haskell, put a space before the bird tracks