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 :-)

Yep, I got this one wrong.

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.

Notice, though, that the original only supported level 4 sections (i.e. 5 =), see

https://github.com/geany/geany/blob/f227076dc425052b85091e495b04f6d5b7a3f965/tagmanager/ctags/asciidoc.c#L42

while the current ctags parser supports level 5 sections (i.e. 6 =), see

https://github.com/geany/geany/blob/ae1f499e3b2fa108d749942008431ec1aaf0294b/ctags/parsers/asciidoc.c#L58

The n_same variable comparison is against the number of = which is +1 than the index to the table. So I think this is correct.

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.

I actually based the new markdown parser on the asciidoc parser with the same limitation of the number of sections so this one could be increased too.


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/1443556064@github.com>