summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/scripts/citation-style-language/citeproc-node-style.lua
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/scripts/citation-style-language/citeproc-node-style.lua')
-rw-r--r--Master/texmf-dist/scripts/citation-style-language/citeproc-node-style.lua13
1 files changed, 4 insertions, 9 deletions
diff --git a/Master/texmf-dist/scripts/citation-style-language/citeproc-node-style.lua b/Master/texmf-dist/scripts/citation-style-language/citeproc-node-style.lua
index 5cc3df5579c..e4e4b7ba8cd 100644
--- a/Master/texmf-dist/scripts/citation-style-language/citeproc-node-style.lua
+++ b/Master/texmf-dist/scripts/citation-style-language/citeproc-node-style.lua
@@ -69,15 +69,10 @@ end
function Style:parse(xml_str)
-- The parsing error is not caught by busted in some situcations and thus it's processed here.
-- discretionary_CitationNumberAuthorOnlyThenSuppressAuthor.txt
- local status, csl_xml = pcall(function () return dom.parse(xml_str) end)
- if not status or not csl_xml then
- if csl_xml then
- local error_message = string.match(csl_xml, "^.-: (.*)$")
- util.error("CSL parsing error: " .. util.rstrip(error_message))
- else
- util.error("CSL parsing error")
- end
- return nil
+ local status, csl_xml = pcall(dom.parse, xml_str)
+ if not status then
+ local error_message = string.match(csl_xml, "^.-: (.*)$")
+ util.error("CSL parsing error: " .. util.rstrip(error_message))
end
local style_node = csl_xml:get_path("style")[1]
if not style_node then