Author: andru.public
Description:
Git patch; adds a $mDoneReferences boolean to determine if <references> has been parsed,
I have tested and found this bug is present in master and REL1_20.
If ParserClearState fires after <ref> tags have been parsed, but before the <references> tag has been parsed, Cite resets the stack and thus when rendering <references> will either fail to display references or will output the "<ref> tag with name [] defined in <references> is not used in prior text" error.
I have a use case of this. I haven't identified *why* ParserClearState is being fired.
I'm attaching a patch which solves this by adding a boolean which is set after the references tag has been processed, ensuring that Cite doesn't reset until *after* <references> has been rendered.
Since I don't entirely understand the design decision to reset on ParserClearState, I'm not sure if this will have unintended consequences and would appreciate some advice.
If it looks good, I'll submit a change on gerrit.
Version: master
Severity: normal
Attached: