The n_same variable in the parser is named confusingly because it's always the number of = +1 and this 1 is then subtracted

No its named right, its the count of the number of characters the same, it needs one subtracted because C is 0 based indexing, but having 0 characters the same is hard to detect as markup :-)

with 5 = is the deepest level supported by the parser.

Although this compares <= 6 whereas the original did <= 5 probably lucky it didn't overflow the kinds array. Thats what I mean something changed somewhere. But it looks like not enough changed, maybe someone started and never finished the change.

Would probably be trivial to increase this limit though.

Probably should be, current Asciidoc has the levels as the OP copied from its docs.

Historically IIRC (its a looooong time ago) it was originally designed to mainly handle sections with the heading underlined by a line of the same length, of which there are only four levels, but those are now correctly deprecated in Asciidoc since they don't work with variable width fonts, and are shaky with Asian double width characters, and really bad with other Unicode characters of zero, half, and one and a half width. That would explain the comment here.


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <geany/geany/issues/3411/1443179526@github.com>