"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/Text/Pandoc/Error.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.

Error.hs  (pandoc-2.14.0.3):Error.hs  (pandoc-2.14.1)
skipping to change at line 100 skipping to change at line 100
errorInFile = errorInFile =
case sortOn (Down . sourceLine . fst) case sortOn (Down . sourceLine . fst)
[ (pos,t) [ (pos,t)
| (pos,t) <- inputs | (pos,t) <- inputs
, sourceName pos == errFile , sourceName pos == errFile
, sourceLine pos <= errLine , sourceLine pos <= errLine
] of ] of
[] -> "" [] -> ""
((pos,txt):_) -> ((pos,txt):_) ->
let ls = T.lines txt <> [""] let ls = T.lines txt <> [""]
ln = errLine - sourceLine pos ln = (errLine - sourceLine pos) + 1
in if length ls > ln - 1 in if length ls > ln && ln >= 1
then T.concat ["\n", ls !! (ln - 1) then T.concat ["\n", ls !! (ln - 1)
,"\n", T.replicate (errColumn - 1) " " ,"\n", T.replicate (errColumn - 1) " "
,"^"] ,"^"]
else "" else ""
in "\nError at " <> tshow err' <> errorInFile in "Error at " <> tshow err' <> errorInFile
PandocMakePDFError s -> s PandocMakePDFError s -> s
PandocOptionError s -> s PandocOptionError s -> s
PandocSyntaxMapError s -> s PandocSyntaxMapError s -> s
PandocFailOnWarningError -> "Failing because there were warnings." PandocFailOnWarningError -> "Failing because there were warnings."
PandocPDFProgramNotFoundError pdfprog -> PandocPDFProgramNotFoundError pdfprog ->
pdfprog <> " not found. Please select a different --pdf-engine or instal l " <> pdfprog pdfprog <> " not found. Please select a different --pdf-engine or instal l " <> pdfprog
PandocPDFError logmsg -> "Error producing PDF.\n" <> logmsg PandocPDFError logmsg -> "Error producing PDF.\n" <> logmsg
PandocXMLError fp logmsg -> "Invalid XML" <> PandocXMLError fp logmsg -> "Invalid XML" <>
(if T.null fp then "" else " in " <> fp) <> ":\n" <> logmsg (if T.null fp then "" else " in " <> fp) <> ":\n" <> logmsg
PandocFilterError filtername msg -> "Error running filter " <> PandocFilterError filtername msg -> "Error running filter " <>
 End of changes. 2 change blocks. 
3 lines changed or deleted 3 lines changed or added

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