docs: add Attachment Model overview to enhancements reference#188
Merged
Conversation
Documents the governing principle ("attributes precede their target;
adjacency selects the tighter target where supported") and a single
table covering all djot-php attribute targets (block, inline, <li>,
<dt>, <dd>, <dl>, table row, table cell, marker-glyph not-addressable
note). Notes the start/type/reversed strip on <li>/<dd> (#187) and
the list-item last-content-line rule (#186).
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #188 +/- ##
=========================================
Coverage 91.12% 91.12%
Complexity 3354 3354
=========================================
Files 99 99
Lines 8575 8575
=========================================
Hits 7814 7814
Misses 761 761 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds an "Attachment Model" overview to
docs/reference/enhancements.mddocumenting where each block construct expects its attribute block. Crosslinked fromdocs/guide/syntax.md.Why
djot-php has accumulated several attribute extensions (list items, definition list elements, table rows, table cells) each with its own attachment position. The individual sections document the what; this overview documents the governing principle — attributes precede their target; adjacency selects the tighter target — and the deliberate "last-content-line" exceptions for list items and
<dd>.Also documents two things readers consistently ask about:
::marker.start,type, andreversedare<ol>-only HTML attributes and are silently stripped from<li>/<dd>output (the strip itself landed in fix: strip <ol>-only attrs (start, type, reversed) from <li>/<dd> #187).No behavior change
Docs-only.
Related
{.x}terminator fix (merged)<ol>-only attrs from<li>/<dd>(merged)