"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/Text/Pandoc/Readers/RST.hs" between
pandoc-2.14.0.3.tar.gz and pandoc-2.14.1.tar.gz

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

RST.hs  (pandoc-2.14.0.3):RST.hs  (pandoc-2.14.1)
skipping to change at line 476 skipping to change at line 476
let ident = maybe "" trimr $ lookup "name" fields let ident = maybe "" trimr $ lookup "name" fields
let parser = let parser =
case lookup "code" fields of case lookup "code" fields of
Just lang -> Just lang ->
(codeblock ident classes fields (trimr lang) False (codeblock ident classes fields (trimr lang) False
. sourcesToText) <$> getInput . sourcesToText) <$> getInput
Nothing -> Nothing ->
case lookup "literal" fields of case lookup "literal" fields of
Just _ -> B.rawBlock "rst" . sourcesToText <$> getInput Just _ -> B.rawBlock "rst" . sourcesToText <$> getInput
Nothing -> parseBlocks Nothing -> parseBlocks
let isLiteral = isJust (lookup "code" fields `mplus` lookup "literal" fields)
let selectLines = let selectLines =
(case trim <$> lookup "end-before" fields of (case trim <$> lookup "end-before" fields of
Just patt -> takeWhile (not . (patt `T.isInfixOf`)) Just patt -> takeWhile (not . (patt `T.isInfixOf`))
Nothing -> id) . Nothing -> id) .
(case trim <$> lookup "start-after" fields of (case trim <$> lookup "start-after" fields of
Just patt -> drop 1 . Just patt -> drop 1 .
dropWhile (not . (patt `T.isInfixOf`)) dropWhile (not . (patt `T.isInfixOf`))
Nothing -> id) Nothing -> id)
let toStream t = let toStream t =
toSources [(f, T.unlines . selectLines . T.lines $ t)] Sources [(initialPos f,
(T.unlines . selectLines . T.lines $ t) <>
if isLiteral then mempty else "\n")] -- see #7436
currentDir <- takeDirectory . sourceName <$> getPosition currentDir <- takeDirectory . sourceName <$> getPosition
insertIncludedFile parser toStream [currentDir] f startLine endLine insertIncludedFile parser toStream [currentDir] f startLine endLine
-- --
-- list blocks -- list blocks
-- --
list :: PandocMonad m => RSTParser m Blocks list :: PandocMonad m => RSTParser m Blocks
list = choice [ bulletList, orderedList, definitionList ] <?> "list" list = choice [ bulletList, orderedList, definitionList ] <?> "list"
 End of changes. 3 change blocks. 
1 lines changed or deleted 5 lines changed or added

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