"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/Text/Pandoc/Writers/Markdown.hs" between
pandoc-2.11.1.1.tar.gz and pandoc-2.11.2.tar.gz

About: Pandoc converts files from one markup format into another.

Markdown.hs  (pandoc-2.11.1.1):Markdown.hs  (pandoc-2.11.2)
skipping to change at line 517 skipping to change at line 517
| f `elem` ["latex", "tex"] -> | f `elem` ["latex", "tex"] ->
case () of case () of
_ | isEnabled Ext_raw_tex opts -> return $ _ | isEnabled Ext_raw_tex opts -> return $
literal str <> literal "\n" literal str <> literal "\n"
| isEnabled Ext_raw_attribute opts -> rawAttribBlock | isEnabled Ext_raw_attribute opts -> rawAttribBlock
| otherwise -> renderEmpty | otherwise -> renderEmpty
| otherwise -> renderEmpty | otherwise -> renderEmpty
blockToMarkdown' opts HorizontalRule = blockToMarkdown' opts HorizontalRule =
return $ blankline <> literal (T.replicate (writerColumns opts) "-") <> blankl ine return $ blankline <> literal (T.replicate (writerColumns opts) "-") <> blankl ine
blockToMarkdown' opts (Header level attr inlines) = do blockToMarkdown' opts (Header level attr inlines) = do
-- first, if we're putting references at the end of a section, we -- first, if we're putting references at the end of a section, we
-- put them here. -- put them here.
blkLevel <- asks envBlockLevel blkLevel <- asks envBlockLevel
refs <- if writerReferenceLocation opts == EndOfSection && blkLevel == 1 refs <- if writerReferenceLocation opts == EndOfSection && blkLevel == 1
then notesAndRefs opts then notesAndRefs opts
else return empty else return empty
variant <- asks envVariant variant <- asks envVariant
-- we calculate the id that would be used by auto_identifiers -- we calculate the id that would be used by auto_identifiers
-- so we know whether to print an explicit identifier -- so we know whether to print an explicit identifier
skipping to change at line 546 skipping to change at line 547
_ | isEnabled Ext_header_attributes opts -> _ | isEnabled Ext_header_attributes opts ->
space <> attrsToMarkdown attr space <> attrsToMarkdown attr
| otherwise -> empty | otherwise -> empty
contents <- inlineListToMarkdown opts $ contents <- inlineListToMarkdown opts $
-- ensure no newlines; see #3736 -- ensure no newlines; see #3736
walk lineBreakToSpace $ walk lineBreakToSpace $
if level == 1 && variant == PlainText && if level == 1 && variant == PlainText &&
isEnabled Ext_gutenberg opts isEnabled Ext_gutenberg opts
then capitalize inlines then capitalize inlines
else inlines else inlines
let setext = writerSetextHeaders opts let setext = writerSetextHeaders opts
hdr = nowrap $ case level of when (not setext && isEnabled Ext_literate_haskell opts) $
report $ ATXHeadingInLHS level (render Nothing contents)
let hdr = nowrap $ case level of
1 | variant == PlainText -> 1 | variant == PlainText ->
if isEnabled Ext_gutenberg opts if isEnabled Ext_gutenberg opts
then blanklines 3 <> contents <> blanklines 2 then blanklines 3 <> contents <> blanklines 2
else contents <> blankline else contents <> blankline
| setext -> | setext ->
contents <> attr' <> cr <> literal (T.replicate (offset conten ts) "=") <> contents <> attr' <> cr <> literal (T.replicate (offset conten ts) "=") <>
blankline blankline
2 | variant == PlainText -> 2 | variant == PlainText ->
if isEnabled Ext_gutenberg opts if isEnabled Ext_gutenberg opts
then blanklines 2 <> contents <> blankline then blanklines 2 <> contents <> blankline
 End of changes. 3 change blocks. 
1 lines changed or deleted 6 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)