flexmark-java
flexmark-java copied to clipboard
Parsing of markers starting with a letter
Is your feature request related to a problem? Please describe.
I am converting Jira markup into another custom markup. When I tried to write a custom parser for Jira style headings (e. g. "h1. Some Heading" https://jira.atlassian.com/secure/WikiRendererHelpAction.jspa?section=headings), I bumped into a "little performance optimization" in DocumentParser, that skips all lines starting with a letter.
Describe the solution you'd like Introduce a parser option disabling this optimisation.
Additional context
The code in question in DocumentParser.incorporateLine
// this is a little performance optimization:
if (blank || (indent < myParsing.CODE_BLOCK_INDENT && Parsing.isLetter(line, nextNonSpace))) {
setNewIndex(nextNonSpace);
break;
}