3
0
mirror of https://github.com/larvit/adf-codec.git synced 2026-11-19 14:45:44 +01:00

Read the inline text, and decode the escapes and references CommonMark spells (#33)

This commit is contained in:
2026-08-30 23:32:57 +02:00
parent 3a05357ea3
commit 5975d8d912
25 changed files with 729 additions and 110 deletions
+1
View File
@@ -0,0 +1 @@
unmappable-html
+1
View File
@@ -0,0 +1 @@
A paragraph carrying a raw <span class="draft">tag</span> in its text.
@@ -0,0 +1,37 @@
{
"content": [
{
"content": [
{
"text": "© 2026 — the № you asked for, & nothing else.",
"type": "text"
}
],
"type": "paragraph"
},
{
"content": [
{
"text": "Escaped, the reference stays literal: &copy; and ",
"type": "text"
},
{
"marks": [
{
"type": "code"
}
],
"text": "&copy;",
"type": "text"
},
{
"text": " alike.",
"type": "text"
}
],
"type": "paragraph"
}
],
"type": "doc",
"version": 1
}
@@ -0,0 +1,3 @@
&copy; 2026 &mdash; the &#x2116; you asked for, &amp; nothing else.
Escaped, the reference stays literal: \&copy; and `&copy;` alike.
+22
View File
@@ -0,0 +1,22 @@
{
"content": [
{
"content": [
{
"text": "A paragraph the author soft-wrapped across three lines, holding a hard break",
"type": "text"
},
{
"type": "hardBreak"
},
{
"text": "the backslash spells.",
"type": "text"
}
],
"type": "paragraph"
}
],
"type": "doc",
"version": 1
}
+3
View File
@@ -0,0 +1,3 @@
A paragraph the author soft-wrapped
across three lines, holding a hard break\
the backslash spells.
@@ -44,6 +44,24 @@
}
],
"type": "paragraph"
},
{
"content": [
{
"text": "<div opens no HTML block",
"type": "text"
}
],
"type": "paragraph"
},
{
"content": [
{
"text": "<?php opens none either",
"type": "text"
}
],
"type": "paragraph"
}
],
"type": "doc",
@@ -7,3 +7,7 @@
snake_case_name
\*not emphasis\*
\<div opens no HTML block
\<?php opens none either