Commit 593e4179 authored by User expired's avatar User expired
Browse files

bib-name: Fix to merge dashes for filename creation

parent 3e83c28d
......@@ -113,8 +113,8 @@ do
# New file names.
newpdfname="${fauthor}_${year}${letter}_${journal}"
# Only keep allowed characters.
newpdfname=$(sed "s/[^$ALLOWED_CHARS]//g" <<< "$newpdfname")
# Only keep allowed characters and merge dashes.
newpdfname=$(sed "s/[^$ALLOWED_CHARS]//g;s/---*/-/g" <<< "$newpdfname")
# Add path prefix and file suffixes.
newbibname="$(dirname "$bibfile")/${newpdfname}.pdf.bib"
newpdfname="$(dirname "$bibfile")/${newpdfname}.pdf"
......
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