Skip to content

Conversation

@dereuromark
Copy link
Contributor

Summary

  • Add support for HTML5 semantic block elements that were missing from HtmlToDjot:

    • address - contact information
    • details - disclosure widget
    • dialog - dialog box
    • fieldset - form group
    • form - form container
    • hgroup - heading group
    • menu - menu container
    • search - search section (HTML5.2)
  • These elements are now properly recognized in both:

    • The $blockElements array (for breaking implicit paragraphs)
    • The match statement (for processing as block containers)

Test plan

  • Added 10 new test cases for HTML5 block elements
  • Tests verify content extraction works correctly
  • Tests verify block elements break implicit paragraphs
  • All 79 HtmlToDjot tests pass
  • PHPStan Level 9 passes

Closes #58

Add support for address, details, dialog, fieldset, form, hgroup, menu,
and search elements as block-level elements. These are now properly
recognized in both the blockElements array and the match statement,
ensuring they break implicit paragraphs correctly.

Closes #58
@codecov
Copy link

codecov bot commented Jan 14, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.48%. Comparing base (61ee4cd) to head (107a1ea).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master      #64      +/-   ##
============================================
+ Coverage     93.42%   93.48%   +0.05%     
  Complexity     1956     1956              
============================================
  Files            74       74              
  Lines          5246     5247       +1     
============================================
+ Hits           4901     4905       +4     
+ Misses          345      342       -3     

☔ 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 6c0ff92 into master Jan 14, 2026
6 checks passed
@dereuromark dereuromark deleted the fix/strpos-and-html5-blocks branch January 14, 2026 10:23
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.

HtmlToDjot: Missing HTML5 block elements in $blockElements array

2 participants