Skip to content

Commit 8453ad9

Browse files
arobase-cheChristianMurphy
authored andcommitted
Update description of Code (#22)
* Update description of Code * infoString => info
1 parent 0d45035 commit 8453ad9

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

readme.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -157,14 +157,17 @@ 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+
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)
163165

164166
```idl
165167
interface Code <: Text {
166168
type: "code";
167169
lang: string | null;
170+
info: string | null;
168171
}
169172
```
170173

@@ -180,6 +183,7 @@ Yields:
180183
{
181184
"type": "code",
182185
"lang": null,
186+
"info": null,
183187
"value": "foo()"
184188
}
185189
```

0 commit comments

Comments
 (0)