Skip to content

Cover the empty-figure early return in plain text - #272

Merged
dereuromark merged 1 commit into
masterfrom
test/empty-figure-coverage
Aug 15, 2026
Merged

Cover the empty-figure early return in plain text#272
dereuromark merged 1 commit into
masterfrom
test/empty-figure-coverage

Conversation

@dereuromark

Copy link
Copy Markdown
Contributor

Coverage follow-up to #271, which Codecov flagged with one uncovered line.

PlainTextRenderer::renderFigure() returns an empty string when nothing inside the figure renders, so an empty figure contributes no text at all - not even the blank line every other block terminates with. No djot source spells that shape, which is why the branch stayed uncovered, but the AST does, and FigureGroupExtension (#270) reaches it whenever a figure div holds no renderable content.

The test builds the node directly rather than parsing, because parsing cannot produce it.

renderFigure() returns an empty string when nothing in the figure
renders, skipping the blank-line terminator every other block emits.
No source spells that shape, so the branch went uncovered; the AST
does, and FigureGroupExtension reaches it whenever a figure div holds
no renderable content.
@codecov

codecov Bot commented Aug 15, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.42%. Comparing base (d1aab1a) to head (21a27a0).

Additional details and impacted files
@@            Coverage Diff            @@
##             master     #272   +/-   ##
=========================================
  Coverage     92.41%   92.42%           
  Complexity     3682     3682           
=========================================
  Files           109      109           
  Lines         10440    10440           
=========================================
+ Hits           9648     9649    +1     
+ Misses          792      791    -1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@dereuromark
dereuromark merged commit 72442e7 into master Aug 15, 2026
6 checks passed
@dereuromark
dereuromark deleted the test/empty-figure-coverage branch August 15, 2026 12:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant