bug avec l'utilisation de gensub()
This commit is contained in:
parent
bda961fc5b
commit
bdd859c5ae
|
@ -399,9 +399,9 @@ function write_unseen(write_section, wrote_section) {
|
||||||
splitvar "$param" name value
|
splitvar "$param" name value
|
||||||
script="$script
|
script="$script
|
||||||
in_section && \$0 ~ /^[ $TAB]*((##*|;;*)[ $TAB]*)?$name[ $TAB]*=/ {
|
in_section && \$0 ~ /^[ $TAB]*((##*|;;*)[ $TAB]*)?$name[ $TAB]*=/ {
|
||||||
\$0 = gensub(/^[ $TAB]*(##*|;;*)[ $TAB]*($name[ $TAB]*=)/, \"\\\\2\", \"\")
|
\$0 = gensub(/^[ $TAB]*(##*|;;*)[ $TAB]*($name[ $TAB]*=)/, \"\\\\2\", 1)
|
||||||
if (hasvalues[$i]) {
|
if (hasvalues[$i]) {
|
||||||
\$0 = gensub(/^([ $TAB]*$name[ $TAB]*=[ $TAB]*).*\$/, \"\\\\1\" values[$i], \"\")
|
\$0 = gensub(/^([ $TAB]*$name[ $TAB]*=[ $TAB]*).*\$/, \"\\\\1\" values[$i], 1)
|
||||||
}
|
}
|
||||||
seen[$i] = 1
|
seen[$i] = 1
|
||||||
modified = 0
|
modified = 0
|
||||||
|
|
|
@ -169,7 +169,7 @@ function write_unseen() {
|
||||||
name="${param%%=*}"
|
name="${param%%=*}"
|
||||||
script="$script
|
script="$script
|
||||||
\$0 ~ /^[ $TAB]*(##*[ $TAB]*)?$name[ $TAB]*=/ {
|
\$0 ~ /^[ $TAB]*(##*[ $TAB]*)?$name[ $TAB]*=/ {
|
||||||
\$0 = gensub(/^([ $TAB]*##*)?([ $TAB]*$name[ $TAB]*=[ $TAB]*).*\$/, \"\\\\2\" values[$i], \"\")
|
\$0 = gensub(/^([ $TAB]*##*)?([ $TAB]*$name[ $TAB]*=[ $TAB]*).*\$/, \"\\\\2\" values[$i], 1)
|
||||||
seen[$i] = 1
|
seen[$i] = 1
|
||||||
}"
|
}"
|
||||||
let i=$i+1
|
let i=$i+1
|
||||||
|
|
Loading…
Reference in New Issue