rc clang: Factorize multiple calls to gsub
This commit is contained in:
parent
3161a6255c
commit
657eeb02d2
|
@ -59,14 +59,12 @@ The syntaxic errors detected during parsing are shown when auto-diagnostics are
|
|||
gsub(/~/, "~~", candidate)
|
||||
gsub(/\|/, "\\|", candidate)
|
||||
|
||||
gsub(/[[{<]#|#[}>]/, "", $3)
|
||||
gsub(/#]/, " ", $3)
|
||||
gsub(/[[{<]#|#[]}>]/, "", $3)
|
||||
gsub(/:: /, "::", $3)
|
||||
gsub(/ +$/, "", $3)
|
||||
docstring=$4 ? $3 "\n" $4 : $3
|
||||
|
||||
gsub(/~/, "~~", docstring)
|
||||
gsub(/!/, "!!", docstring)
|
||||
gsub(/~|!/, "&&", docstring)
|
||||
gsub(/\|/, "\\|", docstring)
|
||||
if (candidate in candidates)
|
||||
candidates[candidate]=candidates[candidate] "\n" docstring
|
||||
|
|
Loading…
Reference in New Issue
Block a user