After testing this new function in practice, if you call abstract_xml() and other abstract functions on the same soup object, and because abstract_xml() uses clear() to get rid of DOI paragraphs, then the abstract in the soup is altered.
The fix here is to make a copy of the abstract tag object before altering it.
Coverage increased (+5.0e-05%) to 99.712% when pulling fe9ece420afea581c4e1860f4a6358d9411763e0 on abstract_xml into cf49daa4ba1bd6acdd81c3dd9f56b0cfc1391a30 on develop.
Bug fix to PR https://github.com/elifesciences/elife-tools/pull/324
After testing this new function in practice, if you call
abstract_xml()
and other abstract functions on the samesoup
object, and becauseabstract_xml()
usesclear()
to get rid of DOI paragraphs, then the abstract in the soup is altered.The fix here is to make a copy of the abstract tag object before altering it.