Commit 4c65e39c authored by User expired's avatar User expired
Browse files

Restore accidentally removed line from previous commit

parent e7fe72da
Pipeline #40150 passed with stage
in 1 minute and 21 seconds
......@@ -47,6 +47,13 @@ ba # Go to label a to repeat search.
' "$1"
}
# Function to insert brackets around non quoted field contents.
function insert_brackets() { # insert_brackets bibfile
sed -i -r '
s/^ ([A-Za-z][A-Za-z_-]*) = ([^{].*[^},])(,*)$/ \1 = {\2}\3/
' "$1"
}
# Function to merge lines.
function merge_lines() { # merge_lines bibfilename
sed -i ':a # Label with name a.
......@@ -118,6 +125,7 @@ do
# Use curly brackets {} instead of double quotes "" or no quotes.
replace_quotes "$tmpfile"
insert_brackets "$tmpfile"
# Remove preceding and trailing whitespace in field contents.
sed -i 's/ *\(},\?\)$/\1/' "$tmpfile"
......
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