Emitter 2c: the inline node directives, the directive marks and the carried whitespace #13
+8
-8
@@ -64,7 +64,8 @@ survives inline parsing. Each section below says whether content is required. `:
|
||||
directive only when the name is followed immediately by `[` or `{`, and `{attrs}` must follow
|
||||
`]` (or the name) with no gap — anything else (`10:30`, `:smile:`, a stray `{…}` in text) is
|
||||
literal text. An inline directive binds as a unit before bracket matching, the way a code span
|
||||
does: a `]` or `(` inside its `{attrs}` is the directive's, never the enclosing content's.
|
||||
does: a `]` or `(` inside its `{attrs}` is the directive's, never the enclosing content's, and a
|
||||
`(` after its closing `]` opens no link.
|
||||
|
||||
**Container block**:
|
||||
|
||||
@@ -100,9 +101,9 @@ form, and omits empty `{attrs}` except where the `{` itself claims the directive
|
||||
(`:hardBreak{}`).
|
||||
|
||||
**Escaping**: the emitter backslash-escapes whatever literal text would otherwise parse as
|
||||
directive syntax — the leading `:` of a would-be directive, `]` inside content, a `{` right after
|
||||
a directive's closing `]`, which would otherwise be read as the attributes it has none of; outside code
|
||||
spans and code blocks, a backslash before `:` in input yields a literal colon.
|
||||
directive syntax — the leading `:` of a would-be directive, `]` inside content, a `{` right
|
||||
after a directive's closing `]`, which would otherwise be read as the attributes it has none
|
||||
of; outside code spans and code blocks, a backslash before `:` in input yields a literal colon.
|
||||
|
||||
**Malformed directives are error results**, named: an unclosed container at end of input, a body
|
||||
fence line of the container's length or longer, a bare colon-run line outside any container or
|
||||
@@ -216,11 +217,10 @@ One header row plus plain inline cells is a pipe table; anything richer is the d
|
||||
(AGENTS.md §4). Precisely: a table emits as a pipe table exactly when the `table`, every row
|
||||
and every cell carry no attrs and no marks, the first row is all `tableHeader` and the rest all
|
||||
`tableCell`, every row has the header's cell count, and every cell holds exactly one attr-less,
|
||||
mark-less paragraph — an empty cell holds one empty paragraph — with no `|` anywhere the inline
|
||||
layer spells as syntax — a code span, a link destination or title, an inline directive's
|
||||
mark-less paragraph — an empty cell holds one empty paragraph — with no `|` anywhere the
|
||||
inline layer spells as syntax — a code span, a link destination or title, an inline directive's
|
||||
attributes: backslash escapes are inert there, so pipe form cannot spell that pipe and the table
|
||||
takes the directive form. A pipe table
|
||||
parses back to exactly that shape.
|
||||
takes the directive form. A pipe table parses back to exactly that shape.
|
||||
|
||||
```
|
||||
| Part | Qty |
|
||||
|
||||
Reference in New Issue
Block a user