4.2: a link's brackets balance inside a directive's content

This commit is contained in:
2026-09-14 21:00:15 +02:00
parent eafd863a32
commit 9303235434
5 changed files with 143 additions and 21 deletions
@@ -0,0 +1,111 @@
{
"content": [
{
"content": [
{
"marks": [
{
"type": "subsup"
},
{
"attrs": {
"href": "["
},
"type": "link"
}
],
"text": "a",
"type": "text"
}
],
"type": "paragraph"
},
{
"content": [
{
"marks": [
{
"type": "underline"
},
{
"attrs": {
"href": "]"
},
"type": "link"
}
],
"text": "b",
"type": "text"
},
{
"marks": [
{
"type": "underline"
}
],
"text": " ",
"type": "text"
},
{
"marks": [
{
"type": "underline"
},
{
"attrs": {
"href": "x",
"title": "["
},
"type": "link"
}
],
"text": "c",
"type": "text"
}
],
"type": "paragraph"
},
{
"content": [
{
"marks": [
{
"type": "underline"
},
{
"attrs": {
"href": "e[f]"
},
"type": "link"
}
],
"text": "d",
"type": "text"
}
],
"type": "paragraph"
},
{
"content": [
{
"marks": [
{
"type": "underline"
},
{
"attrs": {
"href": "http://a[b"
},
"type": "link"
}
],
"text": "http://a[b",
"type": "text"
}
],
"type": "paragraph"
}
],
"type": "doc",
"version": 1
}
@@ -0,0 +1,7 @@
:subsup[[a](\[)]
:underline[[b](\]) [c](x "\[")]
:underline[[d](e[f])]
:underline[[http://a\[b](http://a\[b)]