From 3161a6255c2a24dd2629854040d53ac775e48e05 Mon Sep 17 00:00:00 2001 From: Frank LENORMAND Date: Fri, 22 Nov 2019 09:30:30 +0100 Subject: [PATCH] rc clang: Handle nested tags in completion MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Some completion candidates have e.g. `{#…#}` tags in their name/description. They can be nested, which the cleanup regex doesn't take into account. --- rc/tools/clang.kak | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rc/tools/clang.kak b/rc/tools/clang.kak index f5622ddf..8a792173 100644 --- a/rc/tools/clang.kak +++ b/rc/tools/clang.kak @@ -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)