> 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](https://github.com/geany/geany/blob/ae1f499e3b2fa108d749942008431ec1aaf0294b/ctags/parsers/asciidoc.c#L379)
 compares `<= 6` whereas the 
[original](https://github.com/geany/geany/blob/f227076dc425052b85091e495b04f6d5b7a3f965/tagmanager/ctags/asciidoc.c#L195)
 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](https://github.com/geany/geany/blob/ae1f499e3b2fa108d749942008431ec1aaf0294b/ctags/parsers/asciidoc.c#L43).

-- 
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/issues/3411#issuecomment-1443179526
You are receiving this because you are subscribed to this thread.

Message ID: <geany/geany/issues/3411/[email protected]>

Reply via email to