Commit 326ddf03 authored by User expired's avatar User expired
Browse files

bib-format: Fix to not break urls by formatting

parent 2ff7444a
......@@ -139,7 +139,7 @@ do
}" "$tmpfile"
# Replace utf8 characters by latex (except in abstract field).
bib-convl -i "$tmpfile" -f '/^ [Aa]bstract/!'
bib-convl -i "$tmpfile" -f '/^ [Aa]bstract\|^ [Uu]rl/!'
# Escape ampersands.
sed -i '/^ [Aa]bstract\|^ [Uu]rl/!{/&/s/\([^\\]\)&/\1\\\&/g}' "$tmpfile"
......
......@@ -172,6 +172,12 @@ text}' > $fileOne
assertEquals ' Field = {some text}' "$(cat $fileOne)"
}
testUnchangedUrls() {
echo ' Url = {http://sci.xyz/pdf/GetPDF?filetype=pdf&id=abc}' > $fileOne
bib-format $fileOne
assertEquals ' Url = {http://sci.xyz/pdf/GetPDF?filetype=pdf&id=abc}' "$(cat $fileOne)"
}
testFormatStructure() {
bib-format -u $fileOne
bib-format -u $fileTwo
......
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