1
1
# bold text
2
2
3
3
BEGIN_PGML
4
- *bold text with math [`x + 3`]*
4
+ The following is *bold text with math [`x + 3`]*
5
5
END_PGML
6
6
7
7
==>
8
8
9
9
{
10
10
"name": "Program",
11
11
"from": 0,
12
- "to": 51 ,
12
+ "to": 68 ,
13
13
"children": [
14
14
{
15
15
"name": "PGMLBlock",
16
16
"from": 0,
17
- "to": 51 ,
17
+ "to": 68 ,
18
18
"children": [
19
19
{ "name": "BeginPG", "from": 0, "to": 10 },
20
20
{
21
21
"name": "PGMLContent",
22
22
"from": 10,
23
- "to": 43 ,
23
+ "to": 60 ,
24
24
"children": [
25
25
{
26
26
"name": "Paragraph",
27
27
"from": 10,
28
- "to": 43 ,
28
+ "to": 60 ,
29
29
"children": [
30
30
{
31
31
"name": "StrongEmphasis",
32
- "from": 11 ,
33
- "to": 42 ,
32
+ "from": 28 ,
33
+ "to": 59 ,
34
34
"children": [
35
- { "name": "EmphasisMark", "from": 11 , "to": 12 },
35
+ { "name": "EmphasisMark", "from": 28 , "to": 29 },
36
36
{
37
37
"name": "MathMode",
38
- "from": 32 ,
39
- "to": 41 ,
38
+ "from": 49 ,
39
+ "to": 58 ,
40
40
"children": [
41
- { "name": "MathModeMark", "from": 32 , "to": 34 },
42
- { "name": "MathModeMark", "from": 39 , "to": 41 }
41
+ { "name": "MathModeMark", "from": 49 , "to": 51 },
42
+ { "name": "MathModeMark", "from": 56 , "to": 58 }
43
43
]
44
44
},
45
- { "name": "EmphasisMark", "from": 41 , "to": 42 }
45
+ { "name": "EmphasisMark", "from": 58 , "to": 59 }
46
46
]
47
47
}
48
48
]
49
49
}
50
50
]
51
51
},
52
- { "name": "EndPG", "from": 43 , "to": 51 }
52
+ { "name": "EndPG", "from": 60 , "to": 68 }
53
53
]
54
54
}
55
55
]
@@ -59,51 +59,58 @@ END_PGML
59
59
60
60
from: '0'
61
61
parseAll: 'true'
62
- to: '32 '
62
+ to: '49 '
63
63
type: 'root'
64
64
stack: [
65
65
[ # 0
66
66
combine: { indent: 'indent', list: { indent: '1' }, par: 'true' }
67
67
from: '0'
68
68
indent: '0'
69
- to: '32 '
69
+ to: '49 '
70
70
type: 'indent'
71
71
stack: [
72
72
[ # 0
73
+ combine: { text: 'type' }
73
74
from: '0'
74
- to: '31'
75
+ to: '17'
76
+ type: 'text'
77
+ stack: ['The following is ']
78
+ ]
79
+ [ # 1
80
+ from: '17'
81
+ to: '48'
75
82
token: '*'
76
83
type: 'bold'
77
84
stack: [
78
85
[ # 0
79
86
combine: { text: 'type' }
80
- from: '1 '
81
- to: '21 '
87
+ from: '18 '
88
+ to: '38 '
82
89
type: 'text'
83
90
stack: ['bold text with math ']
84
91
]
85
92
[ # 1
86
93
children: [
87
94
{
88
95
combine: { text: 'type' }
89
- from: '23 '
90
- to: '28 '
96
+ from: '40 '
97
+ to: '45 '
91
98
type: 'text'
92
99
stack: ['x + 3']
93
100
}
94
101
]
95
- from: '21 '
102
+ from: '38 '
96
103
terminator: '`]'
97
- to: '30 '
104
+ to: '47 '
98
105
token: '[`'
99
106
type: 'math'
100
107
]
101
108
]
102
109
]
103
- [ # 1
110
+ [ # 2
104
111
combine: { text: 'type' }
105
- from: '31 '
106
- to: '32 '
112
+ from: '48 '
113
+ to: '49 '
107
114
type: 'text'
108
115
stack: ['\n']
109
116
]
@@ -114,46 +121,46 @@ stack: [
114
121
# italic text
115
122
116
123
BEGIN_PGML
117
- _italic text_
124
+ The following is _italic text_
118
125
END_PGML
119
126
120
127
==>
121
128
122
129
{
123
130
"name": "Program",
124
131
"from": 0,
125
- "to": 33 ,
132
+ "to": 50 ,
126
133
"children": [
127
134
{
128
135
"name": "PGMLBlock",
129
136
"from": 0,
130
- "to": 33 ,
137
+ "to": 50 ,
131
138
"children": [
132
139
{ "name": "BeginPG", "from": 0, "to": 10 },
133
140
{
134
141
"name": "PGMLContent",
135
142
"from": 10,
136
- "to": 25 ,
143
+ "to": 42 ,
137
144
"children": [
138
145
{
139
146
"name": "Paragraph",
140
147
"from": 10,
141
- "to": 25 ,
148
+ "to": 42 ,
142
149
"children": [
143
150
{
144
151
"name": "Emphasis",
145
- "from": 11 ,
146
- "to": 24 ,
152
+ "from": 28 ,
153
+ "to": 41 ,
147
154
"children": [
148
- { "name": "EmphasisMark", "from": 11 , "to": 12 },
149
- { "name": "EmphasisMark", "from": 23 , "to": 24 }
155
+ { "name": "EmphasisMark", "from": 28 , "to": 29 },
156
+ { "name": "EmphasisMark", "from": 40 , "to": 41 }
150
157
]
151
158
}
152
159
]
153
160
}
154
161
]
155
162
},
156
- { "name": "EndPG", "from": 25 , "to": 33 }
163
+ { "name": "EndPG", "from": 42 , "to": 50 }
157
164
]
158
165
}
159
166
]
@@ -163,35 +170,42 @@ END_PGML
163
170
164
171
from: '0'
165
172
parseAll: 'true'
166
- to: '14 '
173
+ to: '31 '
167
174
type: 'root'
168
175
stack: [
169
176
[ # 0
170
177
combine: { indent: 'indent', list: { indent: '1' }, par: 'true' }
171
178
from: '0'
172
179
indent: '0'
173
- to: '14 '
180
+ to: '31 '
174
181
type: 'indent'
175
182
stack: [
176
183
[ # 0
184
+ combine: { text: 'type' }
177
185
from: '0'
178
- to: '13'
186
+ to: '17'
187
+ type: 'text'
188
+ stack: ['The following is ']
189
+ ]
190
+ [ # 1
191
+ from: '17'
192
+ to: '30'
179
193
token: '_'
180
194
type: 'italic'
181
195
stack: [
182
196
[ # 0
183
197
combine: { text: 'type' }
184
- from: '1 '
185
- to: '12 '
198
+ from: '18 '
199
+ to: '29 '
186
200
type: 'text'
187
201
stack: ['italic text']
188
202
]
189
203
]
190
204
]
191
- [ # 1
205
+ [ # 2
192
206
combine: { text: 'type' }
193
- from: '13 '
194
- to: '14 '
207
+ from: '30 '
208
+ to: '31 '
195
209
type: 'text'
196
210
stack: ['\n']
197
211
]
0 commit comments