Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: syntax-tree/mdast
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 8453ad9a7bfd71258906a6296b23071f8bbbfc7d
Choose a base ref
..
head repository: syntax-tree/mdast
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 5bf67888e6050377dd964021030c33edff098d9b
Choose a head ref
Showing with 28 additions and 9 deletions.
  1. +28 −9 readme.md
37 changes: 28 additions & 9 deletions readme.md
Original file line number Diff line number Diff line change
@@ -157,17 +157,15 @@ Yields:
### `Code`

`Code` ([`Text`][text]) occurs at block level (see
[`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)
[`InlineCode`][inlinecode] for code spans). The value after the opening
of fenced code can be followed by a language tag, and then optionally
white-space followed by the meta value.

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

@@ -183,11 +181,32 @@ Yields:
{
"type": "code",
"lang": null,
"info": null,
"meta": null,
"value": "foo()"
}
```

And the following markdown:

````md
```js highlight-line="2"
foo()
bar()
baz()
```
````

Yields:

```json
{
"type": "code",
"lang": "js",
"meta": "highlight-line=\"2\"",
"value": "foo()\bbar()\nbaz()"
}
```

### `InlineCode`

`InlineCode` ([`Text`][text]) occurs inline (see [`Code`][code] for
@@ -967,7 +986,7 @@ Yields:
## Contribute

**mdast** is built by people just like you! Check out
[`contribute.md`][contribute] for ways to get started.
[`contributing.md`][contributing] for ways to get started.

This project has a [Code of Conduct][coc]. By interacting with this repository,
organisation, or community you agree to abide by its terms.
@@ -1055,7 +1074,7 @@ Thanks to

[frontmatter]: https://github.com/wooorm/remark-frontmatter

[contribute]: contributing.md
[contributing]: contributing.md

[coc]: code-of-conduct.md