From 86636677881ab7eace0fd9b2993cfdb01adb7b18 Mon Sep 17 00:00:00 2001 From: David Lazar <lazar6@illinois.edu> Date: Fri, 29 Mar 2013 11:43:49 -0700 Subject: Haddock reader: make clearer which production the comment refers to. --- src/Text/Pandoc/Readers/Haddock/Lex.x | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/Text/Pandoc/Readers/Haddock/Lex.x b/src/Text/Pandoc/Readers/Haddock/Lex.x index 9d686c885..a84204e83 100644 --- a/src/Text/Pandoc/Readers/Haddock/Lex.x +++ b/src/Text/Pandoc/Readers/Haddock/Lex.x @@ -55,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 } } -- cgit v1.2.3