Repository navigation
fix(jats): keep the text of inline <term> elements - #5177
Conversation
Signed-off-by: Fahmid Arman <[email protected]>
|
✅ DCO Check Passed Thanks @Fahmid-Arman, all your commits are properly signed off. 🎉 |
Merge Protections🟢 Merge protection satisfied — ready to merge. Show 1 satisfied protection🟢 Enforce conventional commitMake sure that we follow https://www.conventionalcommits.org/en/v1.0.0/
|
AI triage (advisory)Checked commit The JATS backend no longer skips inline Topic labels added: CI safety: no concern found. A maintainer must still approve CI. The |
There was a problem hiding this comment.
AI first review (advisory): no blocker found
This review covers the full diff at 79527224fb. It read the code and did not run it.
Checked that removing <term> from skip lists in docling/backend/xml/jats_backend.py:321 and docling/backend/xml/jats_backend.py:1338 preserves inline term text in titles and paragraphs without regressions in formula handling or inline segmentation.
A maintainer makes the merge decision. This review never approves the pull request.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Issue resolved by this Pull Request:
Resolves #5176
The JATS backend skipped
<term>elements in both_get_text(titles, captions) and_walk_linear(paragraphs), so a defined term inside running text vanished from the sentence.<term>is no longer skipped, and the now-unused skip list in_walk_linearis removed. Formulas are still skipped in_get_textas before.Checklist:
Review evidence:
<title>The <term>PCR</term> step</title>The stepThe PCR step<p>The <term>polymerase chain reaction</term> amplifies DNA.</p>The amplifies DNA.The polymerase chain reaction amplifies DNA.<def-list>) produce the same output as before. Their terms are still not emitted, because there is nodef-listhandling yet; the issue describes that separately.tests/data/jatscontains<term>.test_jats_inline_term_keeps_its_textintests/test_backend_jats.pycovers the heading and the paragraph. It fails onmainand passes with the change.pytest tests/test_backend_jats.py: 93 passed.ruff formatandruff checkare clean on the changed files.