One place where duplicate_tag() is called and seems to be a solution around an example in the kitchen sink XML where there is a <caption> inside a <caption>.
Rewritten to not use duplicate_tag(), instead to look for the caption within caption if present.
It seems to not matter in this case to remove_tag_from_tag() on the original paragraph, so it doesn't seem to require using copy.copy() before altering it. In other cases, I think making a copy of the tag before modifying it may be required for consistent results.
Coverage decreased (-0.02%) to 99.559% when pulling bb0cb7b388917c591d20c7e9a3b659ff4a824a94 on duplicate-tag into c35dee6d21164c87bd7c9fcdfbb0fb82ba814748 on develop.
Part one of issue https://github.com/elifesciences/elife-tools/issues/299
One place where
duplicate_tag()
is called and seems to be a solution around an example in the kitchen sink XML where there is a<caption>
inside a<caption>
.Rewritten to not use
duplicate_tag()
, instead to look for the caption within caption if present.It seems to not matter in this case to
remove_tag_from_tag()
on the original paragraph, so it doesn't seem to require usingcopy.copy()
before altering it. In other cases, I think making a copy of the tag before modifying it may be required for consistent results.