Repository navigation
fix(asciidoc): keep a block title separate from the paragraph it titles - #4391
PeterStaar-IBM merged 1 commit into
Conversation
|
✅ DCO Check Passed Thanks @r0h1tb, 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/
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
A block title is a single line, but the lines after it were appended to the title, so ".Procedure" followed by "Do the thing." became one bold paragraph "Procedure Do the thing.". The title is now emitted as a bold paragraph and the following lines form an ordinary paragraph. Signed-off-by: Rohit Behera <126186063+r0h1tb@users.noreply.github.com>
42a9dd6 to
70eb5c4
Compare
AI triage (advisory)Checked commit The PR changes the AsciiDoc backend so a block title is a single line. The next line now starts a normal paragraph, and the title is emitted as a bold paragraph before it. This stops text loss after a block title. Topic labels added: CI safety: no concern found. A maintainer must still approve CI. The |
Problem
#4431 stopped a block title in front of a paragraph from dropping the rest of the document, but the paragraph is still appended to the title, so the whole paragraph becomes one bold "caption":
Fix
A block title is a single line, so the line after it starts the paragraph it titles. That branch now flushes pending text, emits the title as a bold paragraph (as
_flush_caption_as_paragraphalready does for targets with no caption slot) and starts an ordinary paragraph with the line.Tests
Rebased onto current main. New
test_block_title_is_not_merged_into_the_paragraph_it_titleschecks texts and formatting for a two-line titled paragraph.test_text_before_block_title_is_not_merged_with_text_afterfrom #4431 expected"Caption text2"; it now expects"Caption","text2". Both fail without the fix.tests/test_backend_asciidoc.py: 57 passed on main, 58 with this change. Ruff clean,tyreports the same 3 existing warnings as main.Checklist: