mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-02-20 23:22:56 +01:00
35 lines
906 B
JSON
35 lines
906 B
JSON
{
|
|
"nodes": [
|
|
{
|
|
"kind": "block",
|
|
"type": "paragraph",
|
|
"nodes": [
|
|
{
|
|
"kind": "text",
|
|
"text": "There are certain behaviors that require rendering dynamic marks on string of text, like rendering code highlighting. For example:"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"kind": "block",
|
|
"type": "code",
|
|
"nodes": [
|
|
{
|
|
"kind": "text",
|
|
"text": "// A simple FizzBuzz implementation.\nfor (var i = 1; i <= 100; i++) {\n if (i % 15 == 0) {\n console.log('Fizz Buzz');\n } else if (i % 5 == 0) {\n console.log('Buzz');\n } else if (i % 3 == 0) {\n console.log('Fizz');\n } else {\n console.log(i);\n }\n}"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"kind": "block",
|
|
"type": "paragraph",
|
|
"nodes": [
|
|
{
|
|
"kind": "text",
|
|
"text": "Try it out for yourself!"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|