Fix nixUri source span

Previously it would include the spacing after the URI in the source
span.
This commit is contained in:
Silvan Mosberger 2019-05-05 09:46:21 +02:00 committed by John Wiegley
parent 646cc4adc7
commit 90f6a61a84

View file

@ -286,7 +286,7 @@ nixString :: Parser NExprLoc
nixString = nStr <$> annotateLocation nixString'
nixUri :: Parser NExprLoc
nixUri = annotateLocation1 $ lexeme $ try $ do
nixUri = lexeme $ annotateLocation1 $ try $ do
start <- letterChar
protocol <- many $ satisfy $ \x ->
isAlpha x || isDigit x || x `elem` ("+-." :: String)