fix:journal: include directive error messages now show the correct line
They were showing the line after the include directive, confusingly.
This commit is contained in:
parent
251af8529f
commit
f5d3b7bd38
@ -289,14 +289,14 @@ directivep = (do
|
||||
-- Examples: foo.j, ../foo/bar.j, timedot:/foo/2020*, *.journal
|
||||
includedirectivep :: MonadIO m => ErroringJournalParser m ()
|
||||
includedirectivep = do
|
||||
-- save the position
|
||||
parentoff <- getOffset
|
||||
parentpos <- getSourcePos
|
||||
-- parse
|
||||
string "include"
|
||||
lift skipNonNewlineSpaces1
|
||||
prefixedglob <- rstrip . T.unpack <$> takeWhileP Nothing (`notElem` [';','\n'])
|
||||
lift followingcommentp
|
||||
-- save the position (does sequencing wrt newline matter ? seems not)
|
||||
parentoff <- getOffset
|
||||
parentpos <- getSourcePos
|
||||
-- find file(s)
|
||||
let (mprefix,glb) = splitReaderPrefix prefixedglob
|
||||
paths <- getFilePaths parentoff parentpos glb
|
||||
|
||||
Loading…
Reference in New Issue
Block a user