#2640 Small FandocParser Bug

SlimerDude Wed 13 Sep 2017

When parsing fandoc text I set the parseHeader attribute to false so the parser doesn't misinterpret strong / bold text on the first line as meta:

FandocParser() { it.parseHeader = false }.parseStr("**Hello : Dude!**").dump

<p><strong>Hello : Dude!</strong></p>

But if the fandoc text starts with a blank line, then an error is reported and everything is stuffed in a pre block.

FandocParser() { it.parseHeader = false }.parseStr("\n**Hello : Dude!**").dump

ERROR: Invalid line 1 [str:1]
pre>
**Hello : Dude!**</pre>

Note there are no errors if parseHeader is true:

FandocParser() { it.parseHeader = true }.parseStr("\n**Hello : Dude!**").dump

<meta name='Hello' content='Dude!**'/>

brian Wed 4 Oct 2017

I pushed a fix

Login or Signup to reply.