Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
ionen-angewandte-physik
AG-Wester
bibtools
Commits
e2c7c8ab
Commit
e2c7c8ab
authored
Mar 17, 2021
by
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
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
0 deletions
+8
-0
bin/bib-format
bin/bib-format
+1
-0
test/bib-format_test
test/bib-format_test
+7
-0
No files found.
bin/bib-format
View file @
e2c7c8ab
...
...
@@ -131,6 +131,7 @@ do
sed
-i
-r
's/^ ([A-Za-z][A-Za-z_-]*) = / \L\u\1 = /'
"
$tmpfile
"
# Use curly brackets {} instead of double quotes "" or no quotes.
sed
-i
's/"} *$/"\n}/'
"
$tmpfile
"
# Closing brace on separate line.
replace_quotes
"
$tmpfile
"
insert_brackets
"
$tmpfile
"
...
...
test/bib-format_test
View file @
e2c7c8ab
...
...
@@ -210,6 +210,13 @@ and no comma",' > $fileOne
here",'
>
$fileOne
bib-format
$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
()
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment