Skip to content

Fix HtmlToDjot block structure edge cases#164

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

Fix HtmlToDjot block structure edge cases#164
dereuromark merged 2 commits intomasterfrom
feature/fix-html-to-djot-block-structures

Conversation

@dereuromark
Copy link
Copy Markdown
Contributor

Summary

  • fix
     conversion so nested descendant  elements do not hijack the block and language names like c++ are preserved
  • preserve separate lines in line-block containers when the HTML uses sibling paragraphs
  • preserve paragraph boundaries in blockquotes without leaking whitespace-only text nodes into the Djot output
  • add converter regressions for the new block-structure cases plus the missing HtmlToDjot edge cases now covered on master

Verification

  • 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 95.00000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 93.91%. Comparing base (2ee23fb) to head (31b9d81).
⚠️ Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
src/Converter/HtmlToDjot.php 95.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master     #164      +/-   ##
============================================
+ Coverage     93.83%   93.91%   +0.08%     
- Complexity     3067     3075       +8     
============================================
  Files            93       93              
  Lines          7881     7891      +10     
============================================
+ Hits           7395     7411      +16     
+ Misses          486      480       -6     

☔ 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 c7941ca into master Apr 1, 2026
4 checks passed
@dereuromark dereuromark deleted the feature/fix-html-to-djot-block-structures branch April 1, 2026 18:35
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