Explicit code block is not recognized
If I type an explicit code block such as this:
```
class _MyClass
{
void foo();
};
```
AsciiDoc syntax parser interprets the underscore in _MyClass as the beginning of the italicized text and makes the rest of the code block and the following text rendered italic in Sublime Text. asciidoctor interprets this correctly: _MyClass is interpreted verbatim and neither the code block nor the following text is italic in the output.
Also, the explicit code block is not highlighted as a code block delimited with indentation. I.e. in the above snippet, only the void foo(); line is highlighted as a code block.
Are you interested in trying out my WIP full rewrite in #19?
I'm not sure how I would use that.
If you're not sure why you would use it, it would be to see whether there are large (or small) problems in the syntax. You may be pleasantly surprised that some of the highlighting is closer to standardized scopes. Or you may find some huge glaring error.
If you're not sure how you would use it, you can add my repo as a remote to your local clone and checkout the branch that the PR uses. Then make sure your clone is in (or symlinked into) your Packages directory as "AsciiDoc".
If you're not sure how you would use it, you can add my repo as a remote to your local clone and checkout the branch that the PR uses. Then make sure your clone is in (or symlinked into) your Packages directory as "AsciiDoc".
Thanks. That version still has this issue not fixed.
Actually, I didn't test it properly the first time, as Sublime just restored the original AsciiDoc plugin and used that instead of the linked one. But after fixing that, the new version still doesn't properly highlight the code blocks delimited with three backticks. I think, it interprets two backticks as an empty inline code fragment and the third as an unterminated second inline code fragment.
In fact, it looks like the highlighting is broken in many other contests as well. For example, it parses "C++" in a middle of a line as a beginning of some sort of block. There are a lot of red background on empty lines, which, I assume, means parsing errors. It also interprets characters within the inline code markup (between single backticks), which means e.g. if the text starts with an underscore, the plugin italicizes the following text, even beyond the closing backtick.
All in all, I think the PR is rightfully marked as WIP. :)
Feel free to post broken snippets of code to the PR thread. Thanks for taking a look!
The current repo has no regression tests, but I'm building them as I go.