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.
This commit is contained in:
parent
05a5b4e3c2
commit
7654db9df1
3 changed files with 3 additions and 4 deletions
2
README
2
README
|
@ -2634,7 +2634,7 @@ variants are supported:
|
|||
|
||||
`markdown_github` (Github-flavored Markdown)
|
||||
: `pipe_tables`, `raw_html`, `tex_math_single_backslash`,
|
||||
`fenced_code_blocks`, `fenced_code_attributes`, `auto_identifiers`,
|
||||
`fenced_code_blocks`, `auto_identifiers`,
|
||||
`ascii_identifiers`, `backtick_code_blocks`, `autolink_bare_uris`,
|
||||
`intraword_underscores`, `strikeout`, `hard_line_breaks`
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue