@@ -90,7 +90,12 @@ handleError (Left e) =
9090 ,"\n", replicate (errColumn - 1) ' '
9191 ,"^"]
9292 else ""
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"
97+ then errorInFile
98+ else ""
9499 PandocMakePDFError s -> err 65 s
95100 PandocOptionError s -> err 2 s
96101 PandocSyntaxMapError s -> err 67 s