rc clang: Factorize multiple calls to gsub

This commit is contained in:
Frank LENORMAND 2019-11-22 09:43:39 +01:00
parent 3161a6255c
commit 657eeb02d2

View File

@ -59,14 +59,12 @@ The syntaxic errors detected during parsing are shown when auto-diagnostics are
gsub(/~/, "~~", candidate) gsub(/~/, "~~", candidate)
gsub(/\|/, "\\|", candidate) gsub(/\|/, "\\|", candidate)
gsub(/[[{<]#|#[}>]/, "", $3) gsub(/[[{<]#|#[]}>]/, "", $3)
gsub(/#]/, " ", $3)
gsub(/:: /, "::", $3) gsub(/:: /, "::", $3)
gsub(/ +$/, "", $3) gsub(/ +$/, "", $3)
docstring=$4 ? $3 "\n" $4 : $3 docstring=$4 ? $3 "\n" $4 : $3
gsub(/~/, "~~", docstring) gsub(/~|!/, "&&", docstring)
gsub(/!/, "!!", docstring)
gsub(/\|/, "\\|", docstring) gsub(/\|/, "\\|", docstring)
if (candidate in candidates) if (candidate in candidates)
candidates[candidate]=candidates[candidate] "\n" docstring candidates[candidate]=candidates[candidate] "\n" docstring