1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-03-06 13:59:47 +01:00
Renaud Chaput de4c9e478a Lint JSON, CSS and Markdown files with Prettier (#1612)
* Process and Lint CSS, Markdown and JSON files with Prettier

* Run `yarn prettier` to re-format Markdown, CSS and JSON files
2018-02-07 07:58:41 -08:00

213 lines
4.7 KiB
JSON

{
"document": {
"nodes": [
{
"object": "block",
"type": "paragraph",
"nodes": [
{
"object": "text",
"leaves": [
{
"text":
"There are certain behaviors that require rendering dynamic marks on string of text, like rendering code highlighting. For example:"
}
]
}
]
},
{
"object": "block",
"type": "code",
"data": {
"language": "js"
},
"nodes": [
{
"object": "block",
"type": "code_line",
"nodes": [
{
"object": "text",
"leaves": [
{
"text": "// A simple FizzBuzz implementation."
}
]
}
]
},
{
"object": "block",
"type": "code_line",
"nodes": [
{
"object": "text",
"leaves": [
{
"text": "for (var i = 1; i <= 100; i++) {"
}
]
}
]
},
{
"object": "block",
"type": "code_line",
"nodes": [
{
"object": "text",
"leaves": [
{
"text": " if (i % 15 == 0) {"
}
]
}
]
},
{
"object": "block",
"type": "code_line",
"nodes": [
{
"object": "text",
"leaves": [
{
"text": " console.log('Fizz Buzz');"
}
]
}
]
},
{
"object": "block",
"type": "code_line",
"nodes": [
{
"object": "text",
"leaves": [
{
"text": " } else if (i % 5 == 0) {"
}
]
}
]
},
{
"object": "block",
"type": "code_line",
"nodes": [
{
"object": "text",
"leaves": [
{
"text": " console.log('Buzz');"
}
]
}
]
},
{
"object": "block",
"type": "code_line",
"nodes": [
{
"object": "text",
"leaves": [
{
"text": " } else if (i % 3 == 0) {"
}
]
}
]
},
{
"object": "block",
"type": "code_line",
"nodes": [
{
"object": "text",
"leaves": [
{
"text": " console.log('Fizz');"
}
]
}
]
},
{
"object": "block",
"type": "code_line",
"nodes": [
{
"object": "text",
"leaves": [
{
"text": " } else {"
}
]
}
]
},
{
"object": "block",
"type": "code_line",
"nodes": [
{
"object": "text",
"leaves": [
{
"text": " console.log(i);"
}
]
}
]
},
{
"object": "block",
"type": "code_line",
"nodes": [
{
"object": "text",
"leaves": [
{
"text": " }"
}
]
}
]
},
{
"object": "block",
"type": "code_line",
"nodes": [
{
"object": "text",
"leaves": [
{
"text": "}"
}
]
}
]
}
]
},
{
"object": "block",
"type": "paragraph",
"nodes": [
{
"object": "text",
"leaves": [
{
"text": "Try it out for yourself!"
}
]
}
]
}
]
}
}