@@ -90,7 +90,12 @@ handleError (Left e) =
90 ,"\n", replicate (errColumn - 1) ' '
90 ,"\n", replicate (errColumn - 1) ' '
93− in err 65 $ "\nError at " ++ show err' ++ errorInFile
93+ in err 65 $ "\nError at " ++ show err' ++
94+ -- if error comes from a chunk or included file,
95+ -- then we won't get the right text this way:
96+ if sourceName errPos == "source"
94 PandocMakePDFError s -> err 65 s
99 PandocMakePDFError s -> err 65 s
95 PandocOptionError s -> err 2 s
100 PandocOptionError s -> err 2 s
96 PandocSyntaxMapError s -> err 67 s
101 PandocSyntaxMapError s -> err 67 s