-
Notifications
You must be signed in to change notification settings - Fork 42
/
md_articles@code.md.snap.new
118 lines (117 loc) · 2.41 KB
/
md_articles@code.md.snap.new
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
---
source: rust/src/methods/decode/md.rs
expression: "decode(&content).expect(\"Unable to decode Markdown\")"
input_file: fixtures/articles/code.md
---
{
"type": "Article",
"content": [
{
"type": "Paragraph",
"content": [
"This article fixture is focussed on the Markdown representation of executable code nodes such as ",
{
"type": "CodeFragment",
"text": "CodeChunk"
},
", ",
{
"type": "CodeFragment",
"text": "CodeExpression"
},
", and ",
{
"type": "CodeFragment",
"text": "Parameter"
},
" nodes."
]
},
{
"type": "Heading",
"content": [
"Inline code"
],
"depth": 2
},
{
"type": "Paragraph",
"content": [
"Code expressions have a language and the ",
{
"type": "CodeFragment",
"text": "exec"
},
" keyword in curly braces, like this ",
{
"type": "CodeExpression",
"programmingLanguage": "r",
"text": "1+1"
},
" and this ",
{
"type": "CodeExpression",
"programmingLanguage": "python",
"text": "2+2"
},
"."
]
},
{
"type": "Paragraph",
"content": [
"Non-executable code fragments, lack the ",
{
"type": "CodeFragment",
"text": "exec"
},
" keyword but can have a language e.g. ",
{
"type": "CodeFragment",
"text": "3+3",
"programmingLanguage": "r"
},
"."
]
},
{
"type": "Heading",
"content": [
"Block code"
],
"depth": 2
},
{
"type": "Paragraph",
"content": [
"Code chunk use the ",
{
"type": "CodeFragment",
"text": "exec"
},
" keywork to differentiate them from code blocks,"
]
},
{
"type": "CodeChunk",
"programmingLanguage": "r ",
"text": "\"Hello from R\""
},
{
"type": "Paragraph",
"content": [
"Non executable code blocks do not have the ",
{
"type": "CodeFragment",
"text": "exec"
},
" keyword,"
]
},
{
"type": "CodeBlock",
"text": "# Not executed",
"programmingLanguage": "python"
}
]
}