diff options
author | John MacFarlane <jgm@berkeley.edu> | 2020-07-23 17:47:02 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2020-07-23 17:47:02 -0700 |
commit | 48fb6d947df96e8e1f339b2916740f3e216f8908 (patch) | |
tree | 2eb75a84bd442e93012e4e43fe9a8ee18382feff /src/Text/Pandoc/Writers/Markdown.hs | |
parent | ac1f45c5531ae3af3bba490898ade28460afaa9e (diff) | |
download | pandoc-48fb6d947df96e8e1f339b2916740f3e216f8908.tar.gz |
Add `raw_markdown` extension affecting `ipynb` reader.
Specifying `-f ipynb+raw_markdown` will cause Markdown cells
to be represented as raw Markdown blocks, instead of being
parsed. This is not what you want when going from `ipynb`
to other formats, but it may be useful when going from `ipynb`
to Markdown or to `ipynb`, to avoid semantically insignificant
changes in the contents of the Markdown cells that might
otherwise be introduced.
Closes #5408.
Diffstat (limited to 'src/Text/Pandoc/Writers/Markdown.hs')
-rw-r--r-- | src/Text/Pandoc/Writers/Markdown.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Text/Pandoc/Writers/Markdown.hs b/src/Text/Pandoc/Writers/Markdown.hs index 15807123e..d0b50a8d6 100644 --- a/src/Text/Pandoc/Writers/Markdown.hs +++ b/src/Text/Pandoc/Writers/Markdown.hs @@ -483,10 +483,10 @@ blockToMarkdown' opts b@(RawBlock f str) = do let renderEmpty = mempty <$ report (BlockNotRendered b) case variant of PlainText -> renderEmpty - _ | isEnabled Ext_raw_attribute opts -> rawAttribBlock - | f `elem` ["markdown", "markdown_github", "markdown_phpextra", + _ | f `elem` ["markdown", "markdown_github", "markdown_phpextra", "markdown_mmd", "markdown_strict"] -> return $ literal str <> literal "\n" + | isEnabled Ext_raw_attribute opts -> rawAttribBlock | f `elem` ["html", "html5", "html4"] -> case () of _ | isEnabled Ext_markdown_attribute opts -> return $ |