Widen the carry's spec trigger to the position, and name the raw attribute value 2e must escape
CI / gate (push) Successful in 5s
CI / gate (push) Successful in 5s
This commit is contained in:
@@ -27,11 +27,11 @@ Round-trip equality is a property tested over a corpus, not a claim made in pros
|
||||
## 3. Unknown input policy
|
||||
|
||||
- Unknown ADF node: carried opaquely — raw JSON rides a dedicated syntax in both formats and
|
||||
restores to a deep-equal node. The round-trip holds for documents newer than the library. A
|
||||
known node the position leaves unspelled carries the same way — validity against ADF's content
|
||||
models is not the library's business (§14) — except `hardBreak`, `listItem` and `text` where a
|
||||
block belongs: their spelling lives inside another node's body, so the misplacement is an error
|
||||
result naming it.
|
||||
restores to a deep-equal node. The round-trip holds for documents newer than the library. So
|
||||
does a known node no section spells where it stands, `hardBreak`, `listItem` and `text` where a
|
||||
block belongs excepted. Where a container's own spelling cannot hold the child it has — a
|
||||
`bulletList` outside `listItem`, a `codeBlock` outside text — the error result names that
|
||||
instead.
|
||||
- Unmappable foreign HTML element: error result naming the element — never a silent drop.
|
||||
- Bare `@name` / `:smile:` in typed text: stays a text node. Only directives produce
|
||||
mention/emoji/media nodes; resolving names to ids needs I/O, which is the consumer's job.
|
||||
@@ -121,8 +121,8 @@ live Atlassian APIs; property-generated ADF trees; the CommonMark spec suite aga
|
||||
returns `string | undefined`, never a `Result`: any failure is the fallback signal, and the
|
||||
general form owns the refusal. Refusing there refuses a document the general form spells.
|
||||
- Nothing recurses unbounded: the guards walk iteratively, and blocks, marks and JSON values — an
|
||||
attribute's and a carried node's alike — are all held to 500 levels, so a deep document is a `Result` rather than the stack overflow that
|
||||
waits near 2000.
|
||||
attribute's and a carried node's alike — are all held to 500 levels, so a deep document is a
|
||||
`Result` rather than the stack overflow that waits near 2000.
|
||||
- No casts: `as`, `as unknown as`, non-null `!`. A boundary owes a type guard validating the
|
||||
fields it claims (`isAdfDocument`); past it everything is typed. Make invalid states
|
||||
unrepresentable.
|
||||
|
||||
Reference in New Issue
Block a user