Skip to content

Commit

Permalink
Update description of Code (#22)
Browse files Browse the repository at this point in the history
* Update description of Code

* infoString => info
  • Loading branch information
arobase-che authored and ChristianMurphy committed Aug 1, 2018
1 parent 0d45035 commit 8453ad9
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,14 +157,17 @@ Yields:
### `Code`

`Code` ([`Text`][text]) occurs at block level (see
[`InlineCode`][inlinecode] for code spans). `Code` sports a language
tag (when using GitHub Flavoured Markdown fences with a flag, `null`
otherwise).
[`InlineCode`][inlinecode] for code spans). `Code` supports an
info string and a language tag (when the line with the opening fence
contains some text, it is stored as the info string, the first word
following the fence is stored as the language tag, the rest of the
line is stored as the info string, both are null if missing)

```idl
interface Code <: Text {
type: "code";
lang: string | null;
info: string | null;
}
```

Expand All @@ -180,6 +183,7 @@ Yields:
{
"type": "code",
"lang": null,
"info": null,
"value": "foo()"
}
```
Expand Down

0 comments on commit 8453ad9

Please sign in to comment.