Skip to content

Preserve unsupported figures as raw HTML blocks#171

Merged
dereuromark merged 2 commits intomasterfrom
feature/fix-html-to-djot-figure-fallback
Apr 1, 2026
Merged

Preserve unsupported figures as raw HTML blocks#171
dereuromark merged 2 commits intomasterfrom
feature/fix-html-to-djot-figure-fallback

Conversation

@dereuromark
Copy link
Copy Markdown
Contributor

Summary

  • fall back to raw HTML block syntax when a <figure> cannot be represented losslessly in Djot
  • keep the structured Djot path for supported image and blockquote figures
  • add regression coverage for unsupported figure bodies and figure-level attributes

Testing

  • vendor/bin/phpunit tests/TestCase/Converter/HtmlToDjotTest.php
  • vendor/bin/phpunit tests/TestCase/Converter/HtmlToDjotTest.php tests/TestCase/RoundTripTest.php tests/TestCase/DjotConverterTest.php
  • vendor/bin/phpstan analyse src --no-progress
  • vendor/bin/phpunit

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 1, 2026

Codecov Report

❌ Patch coverage is 84.61538% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 93.95%. Comparing base (6b165b4) to head (72c0db7).
⚠️ Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
src/Converter/HtmlToDjot.php 84.61% 4 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master     #171      +/-   ##
============================================
- Coverage     93.98%   93.95%   -0.04%     
- Complexity     3139     3152      +13     
============================================
  Files            93       93              
  Lines          8017     8041      +24     
============================================
+ Hits           7535     7555      +20     
- Misses          482      486       +4     

☔ View full report in Codecov by Sentry.
📢 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 7c05cbe into master Apr 1, 2026
4 of 6 checks passed
@dereuromark dereuromark deleted the feature/fix-html-to-djot-figure-fallback branch April 1, 2026 21:30
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