Skip to content

Commit

Permalink
Fixes adsabs#153 empty small caps tag
Browse files Browse the repository at this point in the history
 	modified:   adsingestp/parsers/base.py
 	new file:   tests/stubdata/input/jats_empty_smallcaps_tag_apj_976_1_119.xml
 	new file:   tests/stubdata/output/jats_empty_smallcaps_tag_apj_976_1_119.json
 	modified:   tests/test_jats.py
  • Loading branch information
seasidesparrow committed Dec 16, 2024
1 parent 8f3573e commit e252714
Show file tree
Hide file tree
Showing 4 changed files with 3,259 additions and 1 deletion.
3 changes: 2 additions & 1 deletion adsingestp/parsers/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -589,7 +589,8 @@ def _detag(self, r, tags_keep):
continue
else:
if t.lower() == "sc":
e.string = e.string.upper()
if e.string:
e.string = e.string.upper()
e.unwrap()

# Note: newr is converted from a bs4 object to a string here.
Expand Down
Loading

0 comments on commit e252714

Please sign in to comment.