spec-md icon indicating copy to clipboard operation
spec-md copied to clipboard

Should underscores cause parse error in Definition Lists?

Open synlestidae opened this issue 2 years ago • 1 comments

G'day!

This should be easy to explain. I have two markdown snippets. This one works and compiles to HTML successfully:

# Test Spec

test
: The word test has no underscore.

But this definition does not:

# Test Spec

test
: The word test_test has an underscore.

The error message is:

Expected "**", "+", "-", "[", "\\", "\n", "\r", "\r\n", "_", [ \t], or [^\n\r+\-{`*_[!<\\] but end of input found.

content/SPONK.md:5:1
4 | : The word test_test has an underscore.
5 | 
    ^

And it's because of the underscore! I guess it is interpreting _ to mean "begin italics"? In any case, this took a while to track down. I am wanting to use spec-md in my team and the error message makes it hard to debug, and hard for beginners.

Many thanks!

synlestidae avatar Oct 26 '22 22:10 synlestidae

@leebyron I just saw #42 and I guess that explains it. Since the behaviour is expected, it would be really good if the error message were clearer

synlestidae avatar Oct 27 '22 19:10 synlestidae