Skip to content

Commit 009f984

Browse files
committed
Update description of Code
1 parent e1e997c commit 009f984

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

readme.md

+6-3
Original file line numberDiff line numberDiff line change
@@ -157,14 +157,16 @@ Yields:
157157
### `Code`
158158

159159
`Code` ([`Text`][text]) occurs at block level (see
160-
[`InlineCode`][inlinecode] for code spans). `Code` sports a language
161-
tag (when using GitHub Flavoured Markdown fences with a flag, `null`
162-
otherwise).
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+
of the info string is stored as the language tag, null otherwise)
163164

164165
```idl
165166
interface Code <: Text {
166167
type: "code";
167168
lang: string | null;
169+
infoString: string | null;
168170
}
169171
```
170172

@@ -180,6 +182,7 @@ Yields:
180182
{
181183
"type": "code",
182184
"lang": null,
185+
"infoString": null,
183186
"value": "foo()"
184187
}
185188
```

0 commit comments

Comments
 (0)