diff options
author | Karl Berry <karl@freefriends.org> | 2024-04-21 20:10:46 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2024-04-21 20:10:46 +0000 |
commit | ce6cd02afcc9d1f31014cc83870e9ab45c1ec4cd (patch) | |
tree | 44e37d75ce3e01dfc7040474398934f7e6fc331b /Master/texmf-dist/scripts/citation-style-language/citeproc-node-style.lua | |
parent | 919aa6620de6253cba2f8c674e4025eb1df82f59 (diff) |
citation-style-language (21apr24)
git-svn-id: svn://tug.org/texlive/trunk@71025 c570f23f-e606-0410-a88d-b1316a301751
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.lua | 13 |
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 |