rc clang: Handle nested tags in completion

Some completion candidates have e.g. `{#…#}` tags in their
name/description. They can be nested, which the cleanup regex doesn't
take into account.
This commit is contained in:
Frank LENORMAND 2019-11-22 09:30:30 +01:00
parent 82e5346904
commit 3161a6255c

View File

@ -55,7 +55,7 @@ The syntaxic errors detected during parsing are shown when auto-diagnostics are
awk -F ': ' '
/^COMPLETION:/ && $2 !~ /[(,](Hidden|Inaccessible)[),]/ {
candidate=$3
gsub(/[[<{]#[^#]+#[]>}]/, "", candidate)
gsub(/[[<{]#.+?#[]>}]/, "", candidate)
gsub(/~/, "~~", candidate)
gsub(/\|/, "\\|", candidate)