mirror of
https://github.com/neovim/neovim.git
synced 2025-09-28 14:08:32 +00:00
vim-patch:9.1.1754: :helptags doesn't skip examples with syntax
Problem: :helptags doesn't skip examples with syntax
(Evgeni Chasnovski)
Solution: Check for examples with syntax (zeertzjq).
fixes: vim/vim#18273
closes: vim/vim#18277
6f020cde56
This commit is contained in:
@@ -939,10 +939,15 @@ static void helptags_one(char *dir, const char *ext, const char *tagfname, bool
|
||||
}
|
||||
p1 = p2;
|
||||
}
|
||||
size_t len = strlen(IObuff);
|
||||
if ((len == 2 && strcmp(&IObuff[len - 2], ">\n") == 0)
|
||||
|| (len >= 3 && strcmp(&IObuff[len - 3], " >\n") == 0)) {
|
||||
in_example = true;
|
||||
size_t off = strlen(IObuff);
|
||||
if (off >= 2 && IObuff[off - 1] == '\n') {
|
||||
off -= 2;
|
||||
while (off > 0 && (ASCII_ISLOWER(IObuff[off]) || ascii_isdigit(IObuff[off]))) {
|
||||
off--;
|
||||
}
|
||||
if (IObuff[off] == '>' && (off == 0 || IObuff[off - 1] == ' ')) {
|
||||
in_example = true;
|
||||
}
|
||||
}
|
||||
line_breakcheck();
|
||||
}
|
||||
|
Reference in New Issue
Block a user