Make markdownToAdf(adfToMarkdown(doc)) deep-equal doc: textBreak, empty keys, -0, typed carry fences, code blocks of several text nodes
This commit is contained in:
@@ -14,7 +14,19 @@
|
||||
},
|
||||
{
|
||||
"attrs": {
|
||||
"language": "carry"
|
||||
"language": "adf:blockCard"
|
||||
},
|
||||
"content": [
|
||||
{
|
||||
"text": "{\n \"attrs\": {}\n}",
|
||||
"type": "text"
|
||||
}
|
||||
],
|
||||
"type": "codeBlock"
|
||||
},
|
||||
{
|
||||
"attrs": {
|
||||
"language": "adf:"
|
||||
},
|
||||
"content": [
|
||||
{
|
||||
|
||||
@@ -1,12 +1,18 @@
|
||||
!adf:codeBlock {language=carry}
|
||||
```
|
||||
```carry
|
||||
{
|
||||
"type": "blockCard"
|
||||
}
|
||||
```
|
||||
|
||||
!adf:codeBlock {language="adf:blockCard"}
|
||||
```
|
||||
{
|
||||
"attrs": {}
|
||||
}
|
||||
```
|
||||
!adf:/codeBlock
|
||||
|
||||
!adf:codeBlock {language=carry}
|
||||
!adf:codeBlock {language="adf:"}
|
||||
````
|
||||
```
|
||||
````
|
||||
|
||||
@@ -0,0 +1,56 @@
|
||||
{
|
||||
"content": [
|
||||
{
|
||||
"attrs": {
|
||||
"language": "js"
|
||||
},
|
||||
"content": [
|
||||
{
|
||||
"text": "const a = 1\n",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"text": "const b = 2",
|
||||
"type": "text"
|
||||
}
|
||||
],
|
||||
"type": "codeBlock"
|
||||
},
|
||||
{
|
||||
"content": [
|
||||
{
|
||||
"text": "a",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"text": "```",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"text": "\n",
|
||||
"type": "text"
|
||||
}
|
||||
],
|
||||
"type": "codeBlock"
|
||||
},
|
||||
{
|
||||
"attrs": {
|
||||
"language": "has`tick",
|
||||
"wrap": true
|
||||
},
|
||||
"content": [
|
||||
{
|
||||
"text": "x",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"text": " y ",
|
||||
"type": "text"
|
||||
}
|
||||
],
|
||||
"type": "codeBlock"
|
||||
}
|
||||
],
|
||||
"type": "doc",
|
||||
"version": 1
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
!adf:codeBlock
|
||||
```js
|
||||
const a = 1
|
||||
|
||||
```
|
||||
```js
|
||||
const b = 2
|
||||
```
|
||||
!adf:/codeBlock
|
||||
|
||||
!adf:codeBlock
|
||||
```
|
||||
a
|
||||
```
|
||||
````
|
||||
```
|
||||
````
|
||||
```
|
||||
|
||||
|
||||
```
|
||||
!adf:/codeBlock
|
||||
|
||||
!adf:codeBlock {language="has\u0060tick" wrap=true}
|
||||
```
|
||||
x
|
||||
```
|
||||
```
|
||||
y
|
||||
```
|
||||
!adf:/codeBlock
|
||||
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"type": "doc",
|
||||
"version": 1
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
!adf:doc {content=none}
|
||||
@@ -0,0 +1,89 @@
|
||||
{
|
||||
"content": [
|
||||
{
|
||||
"content": [],
|
||||
"type": "paragraph"
|
||||
},
|
||||
{
|
||||
"attrs": {},
|
||||
"content": [
|
||||
{
|
||||
"text": "Plain words.",
|
||||
"type": "text"
|
||||
}
|
||||
],
|
||||
"type": "paragraph"
|
||||
},
|
||||
{
|
||||
"content": [],
|
||||
"type": "rule"
|
||||
},
|
||||
{
|
||||
"attrs": {
|
||||
"level": 2
|
||||
},
|
||||
"content": [
|
||||
{
|
||||
"text": "Title",
|
||||
"type": "text"
|
||||
}
|
||||
],
|
||||
"marks": [],
|
||||
"type": "heading"
|
||||
},
|
||||
{
|
||||
"attrs": {
|
||||
"panelType": "info"
|
||||
},
|
||||
"content": [],
|
||||
"type": "panel"
|
||||
},
|
||||
{
|
||||
"content": [
|
||||
{
|
||||
"attrs": {},
|
||||
"content": [
|
||||
{
|
||||
"content": [
|
||||
{
|
||||
"text": "Item",
|
||||
"type": "text"
|
||||
}
|
||||
],
|
||||
"type": "paragraph"
|
||||
}
|
||||
],
|
||||
"type": "listItem"
|
||||
},
|
||||
{
|
||||
"content": [
|
||||
{
|
||||
"content": [
|
||||
{
|
||||
"text": "Next",
|
||||
"type": "text"
|
||||
}
|
||||
],
|
||||
"type": "paragraph"
|
||||
}
|
||||
],
|
||||
"type": "listItem"
|
||||
}
|
||||
],
|
||||
"type": "bulletList"
|
||||
},
|
||||
{
|
||||
"content": [],
|
||||
"type": "codeBlock"
|
||||
},
|
||||
{
|
||||
"attrs": {
|
||||
"language": "js"
|
||||
},
|
||||
"marks": [],
|
||||
"type": "codeBlock"
|
||||
}
|
||||
],
|
||||
"type": "doc",
|
||||
"version": 1
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
!adf:paragraph {content=empty}
|
||||
!adf:/paragraph
|
||||
|
||||
!adf:paragraph {attrs=empty}
|
||||
Plain words.
|
||||
!adf:/paragraph
|
||||
|
||||
!adf:rule {content=empty}
|
||||
|
||||
!adf:heading {level=2 marks=empty}
|
||||
Title
|
||||
!adf:/heading
|
||||
|
||||
!adf:panel info {content=empty}
|
||||
!adf:/panel
|
||||
|
||||
!adf:bulletList
|
||||
!adf:listItem {attrs=empty}
|
||||
Item
|
||||
!adf:/listItem
|
||||
!adf:listItem
|
||||
Next
|
||||
!adf:/listItem
|
||||
!adf:/bulletList
|
||||
|
||||
!adf:codeBlock {content=empty}
|
||||
!adf:/codeBlock
|
||||
|
||||
!adf:codeBlock {marks=empty}
|
||||
```js
|
||||
```
|
||||
!adf:/codeBlock
|
||||
Reference in New Issue
Block a user