Commit e2c7c8ab authored by User expired's avatar User expired
Browse files

Fix recognition of closing brace after quoted field

parent 278e238c
Pipeline #42464 passed with stage
in 1 minute and 28 seconds
...@@ -131,6 +131,7 @@ do ...@@ -131,6 +131,7 @@ do
sed -i -r 's/^ ([A-Za-z][A-Za-z_-]*) = / \L\u\1 = /' "$tmpfile" sed -i -r 's/^ ([A-Za-z][A-Za-z_-]*) = / \L\u\1 = /' "$tmpfile"
# Use curly brackets {} instead of double quotes "" or no quotes. # Use curly brackets {} instead of double quotes "" or no quotes.
sed -i 's/"} *$/"\n}/' "$tmpfile" # Closing brace on separate line.
replace_quotes "$tmpfile" replace_quotes "$tmpfile"
insert_brackets "$tmpfile" insert_brackets "$tmpfile"
......
...@@ -210,6 +210,13 @@ and no comma",' > $fileOne ...@@ -210,6 +210,13 @@ and no comma",' > $fileOne
here",' > $fileOne here",' > $fileOne
bib-format $fileOne bib-format $fileOne
assertEquals ' Field = {inner "quotes" here},' "$(cat $fileOne)" assertEquals ' Field = {inner "quotes" here},' "$(cat $fileOne)"
# Quoted field followed by closing curly bracket.
echo '@Article{,
Field = "some text"}' > $fileOne
bib-format $fileOne
assertEquals '@Article{,
Field = {some text}
}' "$(cat $fileOne)"
} }
testCurlyBracketsInField() { testCurlyBracketsInField() {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment