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:
@@ -1,17 +1,15 @@
|
||||
> ```carry
|
||||
> ```adf:blockCard
|
||||
> {
|
||||
> "attrs": {
|
||||
> "url": "https://example.com/quoted"
|
||||
> },
|
||||
> "type": "blockCard"
|
||||
> }
|
||||
> }
|
||||
> ```
|
||||
|
||||
- ```carry
|
||||
- ```adf:blockCard
|
||||
{
|
||||
"attrs": {
|
||||
"url": "https://example.com/listed"
|
||||
},
|
||||
"type": "blockCard"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
{
|
||||
"content": [
|
||||
{
|
||||
"attrs": {
|
||||
"language": "js"
|
||||
},
|
||||
"content": [
|
||||
{
|
||||
"marks": [
|
||||
{
|
||||
"type": "strong"
|
||||
}
|
||||
],
|
||||
"text": "const a = 1",
|
||||
"type": "text"
|
||||
}
|
||||
],
|
||||
"type": "codeBlock"
|
||||
},
|
||||
{
|
||||
"content": [
|
||||
{
|
||||
"text": "a",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"type": "hardBreak"
|
||||
}
|
||||
],
|
||||
"type": "codeBlock"
|
||||
}
|
||||
],
|
||||
"type": "doc",
|
||||
"version": 1
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
```adf:codeBlock
|
||||
{
|
||||
"attrs": {
|
||||
"language": "js"
|
||||
},
|
||||
"content": [
|
||||
{
|
||||
"marks": [
|
||||
{
|
||||
"type": "strong"
|
||||
}
|
||||
],
|
||||
"text": "const a = 1",
|
||||
"type": "text"
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
```adf:codeBlock
|
||||
{
|
||||
"content": [
|
||||
{
|
||||
"text": "a",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"type": "hardBreak"
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
@@ -1,23 +1,21 @@
|
||||
```carry
|
||||
```adf:blockCard
|
||||
{
|
||||
"attrs": {
|
||||
"url": "https://example.com/roadmap"
|
||||
},
|
||||
"type": "blockCard"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
!adf:panel info
|
||||
The card below has no spelling yet.
|
||||
|
||||
```carry
|
||||
```adf:embedCard
|
||||
{
|
||||
"attrs": {
|
||||
"layout": "wide",
|
||||
"url": "https://example.com/board",
|
||||
"width": 100
|
||||
},
|
||||
"type": "embedCard"
|
||||
}
|
||||
}
|
||||
```
|
||||
!adf:/panel
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"content": [
|
||||
{
|
||||
"attrs": {
|
||||
"url": "https://example.com/"
|
||||
},
|
||||
"type": "has`tick"
|
||||
},
|
||||
{
|
||||
"type": ""
|
||||
},
|
||||
{
|
||||
"type": " padded"
|
||||
},
|
||||
{
|
||||
"type": "two words"
|
||||
}
|
||||
],
|
||||
"type": "doc",
|
||||
"version": 1
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
```adf:
|
||||
{
|
||||
"attrs": {
|
||||
"url": "https://example.com/"
|
||||
},
|
||||
"type": "has`tick"
|
||||
}
|
||||
```
|
||||
|
||||
```adf:
|
||||
{
|
||||
"type": ""
|
||||
}
|
||||
```
|
||||
|
||||
```adf:
|
||||
{
|
||||
"type": " padded"
|
||||
}
|
||||
```
|
||||
|
||||
```adf:two words
|
||||
{}
|
||||
```
|
||||
Reference in New Issue
Block a user