The existing logic to add <xref> tags around mentions of figures in paragraph text was only surrounding terms that matched the label value exactly (not counting any full stop at the end, which is stripped before looking for matches). If a mention of specific figure panels appeared in the text, the <xref> tag did not expand to included the alphabetical-optionally-hyphenated panel term.
Code includes refactoring to make these parts easier to understand and to test, and there are test cases based on some real observed content and a couple edge cases discovered when developing the code enhancements.
Re issue https://github.com/elifesciences/issues/issues/5795
The existing logic to add
<xref>
tags around mentions of figures in paragraph text was only surrounding terms that matched the label value exactly (not counting any full stop at the end, which is stripped before looking for matches). If a mention of specific figure panels appeared in the text, the<xref>
tag did not expand to included the alphabetical-optionally-hyphenated panel term.E.g. "Author response image 1C-F" instead of
we will now get
Code includes refactoring to make these parts easier to understand and to test, and there are test cases based on some real observed content and a couple edge cases discovered when developing the code enhancements.