diff options
Diffstat (limited to 'src/Text/Pandoc/Readers/Haddock/Lex.x')
-rw-r--r-- | src/Text/Pandoc/Readers/Haddock/Lex.x | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/Text/Pandoc/Readers/Haddock/Lex.x b/src/Text/Pandoc/Readers/Haddock/Lex.x index 902ac84c0..a84204e83 100644 --- a/src/Text/Pandoc/Readers/Haddock/Lex.x +++ b/src/Text/Pandoc/Readers/Haddock/Lex.x @@ -19,7 +19,8 @@ module Text.Pandoc.Readers.Haddock.Lex ( Token(..), LToken, - tokenise + tokenise, + tokenPos ) where import Data.Char @@ -54,14 +55,15 @@ $ident = [$alphanum \'\_\.\!\#\$\%\&\*\+\/\<\=\>\?\@\\\\\^\|\-\~\:] <line> { $ws* \> { begin birdtrack } $ws* \>\>\> { strtoken TokExamplePrompt `andBegin` exampleexpr } - $ws* \n { token TokPara `andBegin` para } - -- Here, we really want to be able to say + $ws* \n { token TokPara `andBegin` para } + -- ^ Here, we really want to be able to say -- $ws* (\n | <eof>) { token TokPara `andBegin` para} -- because otherwise a trailing line of whitespace will result in -- a spurious TokString at the end of a docstring. We don't have <eof>, -- though (NOW I realise what it was for :-). To get around this, we always -- append \n to the end of a docstring. + () { begin string } } |