Citeproc: fix handling of empty URL variables (DOI
, etc.).
The `linkifyVariables` function was changing these to links which then got treated as non-empty by citeproc, leading to wrong results (e.g. ignoring nonempty URL when empty DOI is present). Addresses part 2 of jgm/citeproc#41.
This commit is contained in:
parent
9cbbf18fe1
commit
47f435276a
1 changed files with 3 additions and 1 deletions
|
@ -507,7 +507,9 @@ linkifyVariables ref =
|
|||
x'' = if "://" `T.isInfixOf` x'
|
||||
then x'
|
||||
else pref <> x'
|
||||
in FancyVal (B.link x'' "" (B.str x'))
|
||||
in if T.null x'
|
||||
then x
|
||||
else FancyVal (B.link x'' "" (B.str x'))
|
||||
|
||||
extractText :: Val Inlines -> Text
|
||||
extractText (TextVal x) = x
|
||||
|
|
Loading…
Add table
Reference in a new issue