Skip to content

Conversation

@dereuromark
Copy link
Contributor

Summary

  • Blank lines within definition content now create separate <dd> elements
  • Previously this only happened with multiple terms (: Term1, : Term2)
  • Now single terms also split by blank lines for consistency
  • Terms with no content still create empty <dd>

Before

<dt>Djot</dt>
<dd>
<p>First paragraph</p>
<p>Second paragraph</p>
</dd>

After

<dt>Djot</dt>
<dd><p>First paragraph</p></dd>
<dd><p>Second paragraph</p></dd>

Spec deviation

This deviates from the djot spec, which keeps all content in one <dd>. The spec doesn't explicitly address this, so it's an implementation choice. The change provides more semantic HTML structure where each distinct definition gets its own <dd> element.

Test plan

  • Added tests for blank-line splitting behavior
  • Added test for empty <dd> creation
  • All 922 unit tests pass
  • 1 official test suite deviation (expected - intentional spec difference)

- Blank lines within definition content now create separate <dd> elements
- Previously this only happened with multiple terms (: Term1, : Term2)
- Now single terms also split by blank lines for consistency
- Terms with no content still create empty <dd>

Note: This deviates from djot spec which keeps all content in one dd.
The change provides more semantic HTML structure.
@dereuromark dereuromark marked this pull request as ready for review December 13, 2025 21:24
@codecov
Copy link

codecov bot commented Dec 13, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.58%. Comparing base (a073415) to head (6a74a14).

Additional details and impacted files
@@             Coverage Diff              @@
##             master      #48      +/-   ##
============================================
- Coverage     93.63%   93.58%   -0.05%     
+ Complexity     1913     1900      -13     
============================================
  Files            74       74              
  Lines          5136     5115      -21     
============================================
- Hits           4809     4787      -22     
- Misses          327      328       +1     

☔ 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
Copy link
Contributor Author

dereuromark commented Dec 13, 2025

Superseded by new approach - using explicit : + marker for multiple dd elements instead of blank line splitting.
This helps to not violate the current specs.
#49

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.

2 participants