File tree Expand file tree Collapse file tree 1 file changed +26
-7
lines changed Expand file tree Collapse file tree 1 file changed +26
-7
lines changed Original file line number Diff line number Diff line change @@ -157,17 +157,15 @@ Yields:
157
157
### ` Code `
158
158
159
159
` Code ` ([ ` Text ` ] [ text ] ) occurs at block level (see
160
- [ ` InlineCode ` ] [ inlinecode ] for code spans). ` Code ` supports an
161
- info string and a language tag (when the line with the opening fence
162
- contains some text, it is stored as the info string, the first word
163
- following the fence is stored as the language tag, the rest of the
164
- line is stored as the info string, both are null if missing)
160
+ [ ` InlineCode ` ] [ inlinecode ] for code spans). The value after the opening
161
+ of fenced code can be followed by a language tag, and then optionally
162
+ white-space followed by the meta value.
165
163
166
164
``` idl
167
165
interface Code <: Text {
168
166
type: "code";
169
167
lang: string | null;
170
- info : string | null;
168
+ meta : string | null;
171
169
}
172
170
```
173
171
@@ -183,11 +181,32 @@ Yields:
183
181
{
184
182
"type" : " code" ,
185
183
"lang" : null ,
186
- "info " : null ,
184
+ "meta " : null ,
187
185
"value" : " foo()"
188
186
}
189
187
```
190
188
189
+ And the following markdown:
190
+
191
+ ```` md
192
+ ```js highlight-line="2"
193
+ foo()
194
+ bar()
195
+ baz()
196
+ ```
197
+ ````
198
+
199
+ Yields:
200
+
201
+ ``` json
202
+ {
203
+ "type" : " code" ,
204
+ "lang" : " js" ,
205
+ "meta" : " highlight-line=\" 2\" " ,
206
+ "value" : " foo()\b bar()\n baz()"
207
+ }
208
+ ```
209
+
191
210
### ` InlineCode `
192
211
193
212
` InlineCode ` ([ ` Text ` ] [ text ] ) occurs inline (see [ ` Code ` ] [ code ] for
You can’t perform that action at this time.
0 commit comments