Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also 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: remarkjs/remark
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 14.0.1
Choose a base ref
...
head repository: remarkjs/remark
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 14.0.2
Choose a head ref

Commits on Aug 9, 2021

  1. Update internals

    wooorm committed Aug 9, 2021
    1

    Verified

    This commit was signed with the committer’s verified signature.
    wooorm Titus
    Copy the full SHA
    b2e7bfb View commit details
  2. Update dev-dependencies

    wooorm committed Aug 9, 2021
    1

    Verified

    This commit was signed with the committer’s verified signature.
    wooorm Titus
    Copy the full SHA
    b767382 View commit details

Commits on Aug 26, 2021

  1. 1

    Verified

    This commit was signed with the committer’s verified signature.
    wooorm Titus
    Copy the full SHA
    5c79b32 View commit details
  2. Use npm workspaces

    Closes GH-822.
    ChristianMurphy authored Aug 26, 2021
    1

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    35811dc View commit details

Commits on Aug 29, 2021

  1. Add remark-torchlight to list of plugins

    Closes GH-826.
    
    Reviewed-by: Christian Murphy <christian.murphy.42@gmail.com>
    Reviewed-by: Titus Wormer <tituswormer@gmail.com>
    aarondfrancis authored Aug 29, 2021
    1

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    383871e View commit details

Commits on Sep 5, 2021

  1. Add remark-cite to list of plugins

    Closes GH-838.
    
    Reviewed-by: Titus Wormer <tituswormer@gmail.com>
    benrbray authored Sep 5, 2021
    1

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    92a8e14 View commit details

Commits on Sep 12, 2021

  1. Verified

    This commit was signed with the committer’s verified signature.
    wooorm Titus
    Copy the full SHA
    6894d27 View commit details

Commits on Sep 19, 2021

  1. Update test for change in upstream dependencies

    Closes GH-851.
    
    Reviewed-by: Christian Murphy <christian.murphy.42@gmail.com>
    Reviewed-by: Titus Wormer <tituswormer@gmail.com>
    Trott authored Sep 19, 2021
    1

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    a9a3a46 View commit details

Commits on Oct 3, 2021

  1. Update dev-dependencies

    wooorm committed Oct 3, 2021
    1

    Verified

    This commit was signed with the committer’s verified signature.
    wooorm Titus
    Copy the full SHA
    5866663 View commit details
  2. 1

    Verified

    This commit was signed with the committer’s verified signature.
    wooorm Titus
    Copy the full SHA
    0274817 View commit details
  3. Fix typo

    wooorm committed Oct 3, 2021
    1

    Verified

    This commit was signed with the committer’s verified signature.
    wooorm Titus
    Copy the full SHA
    d0d6f29 View commit details

Commits on Oct 13, 2021

  1. remark-stringify: fix types to disallow options.extensions

    Reviewed-by: Christian Murphy <christian.murphy.42@gmail.com>
    Reviewed-by: Titus Wormer <tituswormer@gmail.com>
    
    Closes GH-874
    JounQin authored Oct 13, 2021
    1

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    a0ef353 View commit details
  2. remark-stringify: 10.0.1

    wooorm committed Oct 13, 2021
    1

    Verified

    This commit was signed with the committer’s verified signature.
    wooorm Titus
    Copy the full SHA
    5544810 View commit details

Commits on Oct 24, 2021

  1. Verified

    This commit was signed with the committer’s verified signature.
    wooorm Titus
    Copy the full SHA
    053a077 View commit details

Commits on Nov 1, 2021

  1. Add remark-extended-table to list of plugins

    Closes GH-886.
    
    Reviewed-by: Titus Wormer <tituswormer@gmail.com>
    wataru-chocola authored Nov 1, 2021
    1

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    20dd056 View commit details

Commits on Nov 11, 2021

  1. Update dev-dependencies

    wooorm committed Nov 11, 2021
    1

    Verified

    This commit was signed with the committer’s verified signature.
    wooorm Titus
    Copy the full SHA
    c55be0f View commit details

Commits on Nov 15, 2021

  1. 1

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    941baa4 View commit details

Commits on Nov 18, 2021

  1. Add improved docs

    Closes GH-900
    
    Reviewed-by: Merlijn Vos <merlijn@soverin.net>
    Reviewed-by: Christian Murphy <christian.murphy.42@gmail.com>
    Reviewed-by: Remco Haszing <remcohaszing@gmail.com>
    Reviewed-by: Morgan Craft <mgan59@gmail.com>
    wooorm authored Nov 18, 2021
    1

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    87c50a5 View commit details
  2. Update dev-dependencies

    wooorm committed Nov 18, 2021
    1

    Verified

    This commit was signed with the committer’s verified signature.
    wooorm Titus
    Copy the full SHA
    c98e00f View commit details
  3. remark-parse: 10.0.1

    wooorm committed Nov 18, 2021
    1

    Verified

    This commit was signed with the committer’s verified signature.
    wooorm Titus
    Copy the full SHA
    5a2a5c9 View commit details
  4. remark-stringify: 10.0.2

    wooorm committed Nov 18, 2021
    1

    Verified

    This commit was signed with the committer’s verified signature.
    wooorm Titus
    Copy the full SHA
    30d5f84 View commit details
  5. 14.0.2

    wooorm committed Nov 18, 2021
    1

    Verified

    This commit was signed with the committer’s verified signature.
    wooorm Titus
    Copy the full SHA
    41fbfba View commit details
Showing with 1,632 additions and 769 deletions.
  1. +1 −0 .github/workflows/main.yml
  2. +3 −224 doc/getting-started.md
  3. +61 −75 doc/plugins.md
  4. +0 −3 lerna.json
  5. +13 −9 package.json
  6. +0 −2 packages/remark-cli/cli.js
  7. +1 −1 packages/remark-cli/package.json
  8. +270 −50 packages/remark-cli/readme.md
  9. +2 −2 packages/remark-cli/test.js
  10. +2 −2 packages/remark-parse/package.json
  11. +257 −63 packages/remark-parse/readme.md
  12. +1 −1 packages/remark-parse/test.js
  13. +6 −2 packages/remark-stringify/lib/index.js
  14. +2 −2 packages/remark-stringify/package.json
  15. +281 −80 packages/remark-stringify/readme.md
  16. +7 −7 packages/remark-stringify/test.js
  17. +2 −2 packages/remark/package.json
  18. +214 −104 packages/remark/readme.md
  19. +448 −79 readme.md
  20. 0 test/fixtures/input/{links-reference-style.text → links-reference-style.nooutput.text}
  21. 0 test/fixtures/input/{links-shortcut-references.text → links-shortcut-references.nooutput.text}
  22. +2 −2 test/fixtures/tree/amps-and-angles-encoding.json
  23. +1 −1 test/fixtures/tree/case-insensitive-refs.json
  24. +2 −2 test/fixtures/tree/definition-in-list-and-blockquote.json
  25. +1 −1 test/fixtures/tree/definition-newline.json
  26. +3 −3 test/fixtures/tree/links-reference-proto.json
  27. +17 −17 test/fixtures/tree/{links-reference-style.json → links-reference-style.nooutput.json}
  28. +6 −6 test/fixtures/tree/{links-shortcut-references.json → links-shortcut-references.nooutput.json}
  29. +1 −1 test/fixtures/tree/main.json
  30. +3 −3 test/fixtures/tree/markdown-documentation-basics.json
  31. +11 −11 test/fixtures/tree/markdown-documentation-syntax.json
  32. +4 −4 test/fixtures/tree/nested-references.json
  33. +1 −1 test/fixtures/tree/ref-paren.json
  34. +1 −1 test/fixtures/tree/reference-image-empty-alt.json
  35. +6 −6 test/fixtures/tree/reference-link-escape.nooutput.json
  36. +1 −1 test/fixtures/tree/reference-link-with-angle-brackets.json
  37. +1 −1 test/fixtures/tree/reference-link-with-multiple-definitions.json
1 change: 1 addition & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -11,6 +11,7 @@ jobs:
- uses: dcodeIO/setup-node-nvm@master
with:
node-version: ${{matrix.node}}
- run: npm install -g npm
- run: npm install
- run: npm test
- uses: codecov/codecov-action@v1
227 changes: 3 additions & 224 deletions doc/getting-started.md
Original file line number Diff line number Diff line change
@@ -1,227 +1,6 @@
![remark][logo]

# Getting started

**remark** transforms markdown.
It’s an ecosystem of [plugins][].
If you get stuck, [issues][] and [Discussions][] are good places to get help.

It’s built on [unified][], make sure to read it and its [website][] too.

## Contents

* [Intro](#intro)
* [Command line](#command-line)
* [Using remark in a project](#using-remark-in-a-project)
* [Programmatic usage](#programmatic-usage)

## Intro

Out of the box, **remark** transforms markdown: markdown is given, reformatted,
and written:

```md
# Alpha #
Bravo charlie **delta** __echo__.
- Foxtrot
```

Yields:

```md
# Alpha

Bravo charlie **delta** **echo**.

* Foxtrot
```

But, much more can be done, [through plugins][plugins].

## Command line

**remark**’s CLI is a simple way to process markdown files from the
command line. Its interface is provided by [**unified-args**][unified-args].

Install [`remark-cli`][cli] and dependencies (in this case a [linting
preset][preset] and [`remark-html`][html]) with [npm][]:

```sh
npm install --global remark-cli remark-html remark-preset-lint-markdown-style-guide
```

`readme.md` contains:

```md
_Hello_.
```

Now, to process `readme.md`, run the following:

```sh
remark readme.md --use html --use preset-lint-markdown-style-guide
```

Yields:

```txt
<p><em>Hello</em>.</p>
readme.md.md
1:1-1:8 warning Emphasis should use `*` as a marker emphasis-marker remark-lint
⚠ 1 warning
```

## Using remark in a project

In the previous example, `remark-cli` was installed globally.
That’s generally a bad idea.
Here we’re going to use the CLI to lint an npm package.

Say we have the following `package.json`:

```json
{
"name": "my-package",
"version": "1.0.0",
"type": "module",
"scripts": {
"test": "node test.js"
}
}
```

And install `remark-cli`, `remark-html`, and
`remark-preset-lint-markdown-style-guide` into it as a dev-dependencies:

```sh
npm install --save-dev remark-cli remark-html remark-preset-lint-markdown-style-guide
```

The `--save-dev` option stores the dependencies in our `package.json`:

```diff
{
"name": "my-package",
"version": "1.0.0",
"type": "module",
+ "devDependencies": {
+ "remark-cli": "^10.0.0",
+ "remark-html": "^14.0.0",
+ "remark-preset-lint-markdown-style-guide": "^5.0.0"
+ },
"scripts": {
"test": "node test.js"
}
}
```

Then, we change our `test` script to include remark, and add
configuration:

```diff
{
"name": "my-package",
"version": "1.0.0",
"type": "module",
"devDependencies": {
"remark-cli": "^10.0.0",
"remark-html": "^14.0.0",
"remark-preset-lint-markdown-style-guide": "^5.0.0"
},
"scripts": {
- "test": "node test.js"
+ "test": "remark . --quiet --frail && node test.js"
+ },
+ "remarkConfig": {
+ "plugins": [
+ "preset-lint-markdown-style-guide",
+ "html"
+ ]
}
}
```

Now from the command line we can run:

```sh
npm test
```

This will lint all markdown files when we test the project.
[`--frail`][frail] ensures the command fails if a code-style violation
is found, and [`--quiet`][quiet] hides successful files from the report.

## Programmatic usage

The programmatic interface of **remark** is provided by
[**unified**][unified].
In fact, [`remark`][api] is two plugins: [`remark-parse`][parse] and
[`remark-stringify`][stringify].

Install [`remark`][api] and dependencies with [npm][]:

```sh
npm install vfile-reporter remark remark-html remark-preset-lint-markdown-style-guide
```

`index.js` contains:

```js
import {reporter} from 'vfile-reporter'
import {remark} from 'remark'
import remarkPresetLintMarkdownStyleGuide from 'remark-preset-lint-markdown-style-guide'
import remarkHtml from 'remark-html'

remark()
.use(remarkPresetLintMarkdownStyleGuide)
.use(remarkHtml)
.process('_Hello_.')
.then((file) => {
console.error(reporter(file))
console.log(String(file))
})
```

`node index.js` yields:

```txt
1:1-1:8 warning Emphasis should use `*` as a marker emphasis-marker remark-lint
⚠ 1 warning
<p><em>Hello</em>.</p>
```

<!-- Definitions -->

[logo]: https://raw.githubusercontent.com/remarkjs/remark/1f338e72/logo.svg?sanitize=true

[issues]: https://github.com/remarkjs/remark/issues

[discussions]: https://github.com/remarkjs/remark/discussions

[npm]: https://docs.npmjs.com/cli/install

[api]: https://github.com/remarkjs/remark/tree/main/packages/remark

[cli]: https://github.com/remarkjs/remark/tree/main/packages/remark-cli

[plugins]: https://github.com/remarkjs/remark/tree/main/doc/plugins.md

[unified]: https://github.com/unifiedjs/unified

[website]: https://unifiedjs.com

[unified-args]: https://github.com/unifiedjs/unified-args

[frail]: https://github.com/unifiedjs/unified-args#--frail

[quiet]: https://github.com/unifiedjs/unified-args#--quiet

[parse]: https://github.com/remarkjs/remark/tree/main/packages/remark-parse

[stringify]: https://github.com/remarkjs/remark/tree/main/packages/remark-stringify

[preset]: https://github.com/remarkjs/remark-lint/tree/HEAD/packages/remark-preset-lint-markdown-style-guide
See [the monorepo readme][remark] for what the remark ecosystem is and examples
of how to get started.

[html]: https://github.com/remarkjs/remark-html
[remark]: https://github.com/remarkjs/remark
136 changes: 61 additions & 75 deletions doc/plugins.md
Original file line number Diff line number Diff line change
@@ -2,33 +2,33 @@

# Plugins

**remark** is a markdown processor powered by plugins part of the [unified][]
[collective][].
**remark** is a tool that transforms markdown with plugins.
See [the monorepo readme][remark] for info on what the remark ecosystem is.
This page lists existing plugins.

## Contents

* [List of plugins](#list-of-plugins)
* [List of presets](#list-of-presets)
* [List of utilities](#list-of-utilities)
* [Using plugins](#using-plugins)
* [Creating plugins](#creating-plugins)
* [Use plugins](#use-plugins)
* [Create plugins](#create-plugins)

## List of plugins

See [awesome remark][awesome] for the most awesome projects in the ecosystem.
See [`awesome-remark`][awesome-remark] for the most awesome projects in the
ecosystem.
More plugins can be found on GitHub tagged with the
[`remark-plugin` topic][topic].

Have a good idea for a new plugin?
See [Creating plugins][create] below.
> 👉 **Note**: some plugins don’t work with recent versions of remark due to
> changes in its underlying parser (micromark).
> Plugins that are up to date or unaffected are marked with `🟢` while plugins
> that are **currently broken** are marked with `⚠️`.
Some plugins are affected by the recent switch in the underlying parser of
remark.
Their status is encoded below as:

* 🟢 This plugin **was not affected** or **a new version is already released**
* ⚠️ This plugin is affected: it’s **currently broken** and maintainers
have been notified
> 💡 **Tip**: remark plugins work with markdown and **rehype** plugins work with
> HTML.
> See rehype’s [List of plugins][rehype-plugins] for more plugins.
The list of plugins:

@@ -38,20 +38,20 @@ The list of plugins:
— new syntax for abbreviations (new node type, rehype compatible)
* ⚠️ [`remark-admonitions`](https://github.com/elviswolcott/remark-admonitions)
— new syntax for admonitions
(**note: [`remark-directive`][d] is similar and up to date**)
(👉 **note**: [`remark-directive`][d] is similar and up to date)
* ⚠️ [`remark-align`](https://github.com/zestedesavoir/zmarkdown/tree/HEAD/packages/remark-align#readme)
— new syntax to align text or blocks (new node types, rehype
compatible)
* ⚠️ [`remark-attr`](https://github.com/arobase-che/remark-attr)
— new syntax to add attributes to markdown
* 🟢 [`remark-autolink-headings`](https://github.com/remarkjs/remark-autolink-headings)
— add GitHub-style links to headings
* 🟢 [`remark-behead`](https://github.com/mrzmmr/remark-behead)
— increase or decrease heading depth
* 🟢 [`remark-breaks`](https://github.com/remarkjs/remark-breaks)
– hard breaks w/o needing spaces (like on issues)
* 🟢 [`remark-capitalize`](https://github.com/zeit/remark-capitalize)
– transform all titles w/ [`title.sh`](https://github.com/zeit/title)
* 🟢 [`remark-cite`](https://github.com/benrbray/remark-cite)
– new syntax for Pandoc-style citations
* 🟢 [`remark-code-blocks`](https://github.com/mrzmmr/remark-code-blocks)
— select and store code blocks
* 🟢 [`remark-code-extra`](https://github.com/samlanning/remark-code-extra)
@@ -72,48 +72,51 @@ The list of plugins:
— new syntax to ignore things
* ⚠️ [`remark-container`](https://github.com/zWingz/remark-container)
— new syntax for containers
(**note: [`remark-directive`][d] is similar and up to date**)
(👉 **note**: [`remark-directive`][d] is similar and up to date)
* ⚠️ [`remark-containers`](https://github.com/Nevenall/remark-containers)
— new syntax for containers
(**note: [`remark-directive`][d] is similar and up to date**)
(👉 **note**: [`remark-directive`][d] is similar and up to date)
* 🟢 [`remark-contributors`](https://github.com/remarkjs/remark-contributors)
— add a table of contributors
* 🟢 [`remark-copy-linked-files`](https://github.com/sergioramos/remark-copy-linked-files)
— find and copy files linked files to a destination directory
* ⚠️ [`remark-custom-blocks`](https://github.com/zestedesavoir/zmarkdown/tree/HEAD/packages/remark-custom-blocks#readme)
— new syntax for custom blocks (new node types, rehype compatible)
(**note: [`remark-directive`][d] is similar and up to date**)
(👉 **note**: [`remark-directive`][d] is similar and up to date)
* 🟢 [`remark-definition-list`](https://github.com/wataru-chocola/remark-definition-list)
— support definition lists
* 🟢 [`remark-defsplit`](https://github.com/remarkjs/remark-defsplit)
— change links and images to references w/ separate definitions
* ⚠️ [`remark-disable-tokenizers`](https://github.com/zestedesavoir/zmarkdown/tree/HEAD/packages/remark-disable-tokenizers#readme)
— turn some or all remark’s tokenizers on or off
* 🟢 [`remark-directive`](https://github.com/remarkjs/remark-directive)
— new syntax for directives (generic extensions)
* 🟢 [`remark-directive-rehype`](https://github.com/IGassmann/remark-directive-rehype)
— turn [directives][d] into HTML custom elements (rehype compatible)
* 🟢 [`remark-dropcap`](https://github.com/brev/remark-dropcap)
— fancy and accessible drop caps
* 🟢 [`remark-embed-images`](https://github.com/remarkjs/remark-embed-images)
— embed local images as base64-encoded data URIs
* 🟢 [`remark-emoji`](https://github.com/rhysd/remark-emoji)
— transform Gemoji short-codes to emoji
* 🟢 [`remark-external-links`](https://github.com/remarkjs/remark-external-links)
add `target` and `rel` attributes to external links
* 🟢 [`remark-extended-table`](https://github.com/wataru-chocola/remark-extended-table)
extended table syntax allowing colspan / rowspan
* 🟢 [`remark-extract-frontmatter`](https://github.com/mrzmmr/remark-extract-frontmatter)
— store front matter in vfiles
* 🟢 [`remark-first-heading`](https://github.com/laat/remark-first-heading)
— change the first heading in a document
* 🟢 [`remark-fix-guillemets`](https://github.com/zestedesavoir/zmarkdown/tree/HEAD/packages/remark-fix-guillemets#readme)
— support ASCII guillements (`<<`, `>>`) mapping them to HTML
* 🟢 [`remark-footnotes`](https://github.com/remarkjs/remark-footnotes)
– support pandoc footnotes
* 🟢 [`remark-frontmatter`](https://github.com/remarkjs/remark-frontmatter)
– support frontmatter (yaml, toml, and more)
* 🟢 [`remark-gemoji`](https://github.com/remarkjs/remark-gemoji)
— better support for Gemoji shortcodes
* ⚠️ [`remark-generic-extensions`](https://github.com/medfreeman/remark-generic-extensions)
— new syntax for the CommonMark generic directive extension
(**note: [`remark-directive`][d] is similar and up to date**)
(👉 **note**: [`remark-directive`][d] is similar and up to date)
* 🟢 [`remark-gfm`](https://github.com/remarkjs/remark-gfm)
— support GFM (tables, tasklists, strikethrough, autolink literals)
— support GFM (autolink literals, footnotes, strikethrough, tables,
tasklists)
* 🟢 [`remark-git-contributors`](https://github.com/remarkjs/remark-git-contributors)
— add a table of contributors based on Git history, options, and more
* 🟢 [`remark-github`](https://github.com/remarkjs/remark-github)
@@ -131,8 +134,6 @@ The list of plugins:
— add hints/tips/warnings to markdown
* 🟢 [`remark-html`](https://github.com/remarkjs/remark-html)
— serialize markdown as HTML
* 🟢 [`remark-html-katex`](https://github.com/remarkjs/remark-math/tree/HEAD/packages/remark-html-katex#readme)
— change inline and block math to equations w/ [KaTeX](https://github.com/Khan/KaTeX)
* ⚠️ [`remark-iframes`](https://github.com/zestedesavoir/zmarkdown/tree/HEAD/packages/remark-iframes#readme)
— new syntax to create iframes (new node type, rehype compatible)
* 🟢 [`remark-images`](https://github.com/remarkjs/remark-images)
@@ -162,11 +163,10 @@ The list of plugins:
— serialize markdown as man pages (roff)
* 🟢 [`remark-math`](https://github.com/remarkjs/remark-math)
— new syntax for math (new node types, rehype compatible)
* 🟢 [`remark-mdx`](https://github.com/mdx-js/mdx/tree/main/packages/remark-mdx)
— support MDX (JSX, expressions, ESM)
* 🟢 [`remark-message-control`](https://github.com/remarkjs/remark-message-control)
— turn some or all messages on or off
* 🟢 [`remark-midas`](https://github.com/remarkjs/remark-midas)
— highlight CSS code blocks w/ [midas](https://github.com/ben-eb/midas)
(rehype compatible)
* 🟢 [`remark-normalize-headings`](https://github.com/remarkjs/remark-normalize-headings)
— make sure at most one top-level heading exists
* 🟢 [`remark-numbered-footnote-labels`](https://github.com/jackfletch/remark-numbered-footnote-labels)
@@ -186,10 +186,6 @@ The list of plugins:
* 🟢 [`remark-prism`](https://github.com/sergioramos/remark-prism)
— highlight code blocks w/ [Prism](https://prismjs.com/) (supporting most
Prism plugins)
* 🟢 [`remark-react`](https://github.com/remarkjs/remark-react)
— compile markdown to [React](https://github.com/facebook/react)
* 🟢 [`remark-react-codemirror`](https://github.com/craftzdog/remark-react-codemirror)
— highlight code blocks for `remark-react` w/ [CodeMirror](https://codemirror.net)
* ⚠️ [`remark-redact`](https://github.com/seafoam6/remark-redact)
— new syntax to conceal text matching a regex
* 🟢 [`remark-redactable`](https://github.com/code-dot-org/remark-redactable)
@@ -212,16 +208,14 @@ The list of plugins:
rehype compatible)
* ⚠️ [`remark-shortcodes`](https://github.com/djm/remark-shortcodes)
— new syntax for Wordpress- and Hugo-like shortcodes (new node type)
(**note: [`remark-directive`][d] is similar and up to date**)
(👉 **note**: [`remark-directive`][d] is similar and up to date)
* 🟢 [`remark-simple-plantuml`](https://github.com/akebifiky/remark-simple-plantuml)
— turn PlantUML code blocks to images
* 🟢 [`remark-slate`](https://github.com/hanford/remark-slate)
— compile markdown to [Slate nodes](https://docs.slatejs.org/concepts/02-nodes)
* 🟢 [`remark-slate-transformer`](https://github.com/inokawa/remark-slate-transformer)
— compile markdown to [Slate nodes](https://docs.slatejs.org/concepts/02-nodes)
and Slate nodes to markdown
* 🟢 [`remark-slug`](https://github.com/remarkjs/remark-slug)
— add anchors to headings using GitHub’s algorithm
* 🟢 [`remark-smartypants`](https://github.com/silvenon/remark-smartypants)
— SmartyPants
* 🟢 [`remark-smcat`](https://github.com/shedali/remark-smcat)
@@ -245,6 +239,8 @@ The list of plugins:
— check and add the document title
* 🟢 [`remark-toc`](https://github.com/remarkjs/remark-toc)
— add a table of contents
* 🟢 [`remark-torchlight`](https://github.com/torchlight-api/remark-torchlight)
— syntax highlighting powered by [torchlight.dev](https://torchlight.dev)
* 🟢 [`remark-tree-sitter`](https://github.com/samlanning/remark-tree-sitter)
— highlight code blocks in markdown files using
[Tree-sitter](https://tree-sitter.github.io/tree-sitter/)
@@ -280,48 +276,56 @@ The list of plugins:

## List of presets

See [npm search][npm-preset-search] or [github search][github-preset-search]
for available and often inspirational presets.
Use [GitHub search][github-preset-search] to find available and often
inspirational presets.

## List of utilities

See [**mdast**][mdast-util] for a list of utilities for working with the syntax
See [mdast][mdast-util] for a list of utilities that work with the syntax
tree.
See [`unist`][unist-util] for other utilities which work with **mdast**
nodes, too.
Finally, see [**vfile**][vfile-util] for a list of utilities working with
virtual files.
See [unist][unist-util] for other utilities which work with **mdast** and other
syntax trees too.
Finally, see [vfile][vfile-util] for a list of utilities working with virtual
files.

## Using plugins
## Use plugins

To use a plugin programmatically, call the [`use()`][unified-use] function.

To use plugin with `remark-cli`, pass a [`--use` flag][unified-args-use] or
specify it in a [configuration file][config-file-use].

## Creating plugins

Have an idea for a plugin?
Post it in [ideas][] and make it happen!
## Create plugins

To create a plugin, first read up on the [concept of plugins][unified-plugins].
Then, read the [guide on “Creating a plugin with unified”][guide].
Finally, take one of existing plugins, which looks similar to what you’re about
to make, and work from there.
If you get stuck, [ideas][], [issues][], and [discussions][] are good places to
get help.

You should pick a name prefixed by `'remark-'`, such as `remark-lint`.
If you get stuck, [discussions][] is a good place to get help.

You should pick a name prefixed by `'remark-'` (such as `remark-lint`).
**Do not use the `remark-` prefix** if the thing you create doesn’t work with
`remark().use()`: it isn’t a “plugin” and will confuse users.
If it works with mdast, use `'mdast-util-'`, if it works with any unist tree,
use `unist-util-`, and if it works with virtual files, use `vfile-`.

Use default exports to expose plugins from your packages, add `remark-plugin`
keywords in `package.json`, add a `remark-plugin` topic to your repo on GitHub,
and create a pull request to add the plugin here on this page!

<!--Definitions:-->

[logo]: https://raw.githubusercontent.com/remarkjs/remark/1f338e72/logo.svg?sanitize=true

[d]: https://github.com/remarkjs/remark-directive

[remark]: https://github.com/remarkjs/remark

[awesome-remark]: https://github.com/remarkjs/awesome-remark

[topic]: https://github.com/topics/remark-plugin

[github-preset-search]: https://github.com/topics/remark-preset

[mdast-util]: https://github.com/syntax-tree/mdast#list-of-utilities

[unist-util]: https://github.com/syntax-tree/unist#unist-utilities
@@ -336,26 +340,8 @@ use `unist-util-`, and if it works with virtual files, use `vfile-`.

[unified-plugins]: https://github.com/unifiedjs/unified#plugin

[issues]: https://github.com/remarkjs/remark/issues

[discussions]: https://github.com/remarkjs/remark/discussions

[guide]: https://unifiedjs.com/learn/guide/create-a-plugin/

[npm-preset-search]: https://www.npmjs.com/search?q=remark-preset

[github-preset-search]: https://github.com/topics/remark-preset

[awesome]: https://github.com/remarkjs/awesome

[ideas]: https://github.com/remarkjs/ideas

[topic]: https://github.com/topics/remark-plugin

[unified]: https://github.com/unifiedjs/unified

[collective]: https://opencollective.com/unified

[create]: #creating-plugins
[discussions]: https://github.com/remarkjs/remark/discussions

[d]: https://github.com/remarkjs/remark-directive
[rehype-plugins]: https://github.com/rehypejs/rehype/blob/main/doc/plugins.md#list-of-plugins
3 changes: 0 additions & 3 deletions lerna.json

This file was deleted.

22 changes: 13 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
@@ -10,31 +10,35 @@
"url": "https://opencollective.com/unified"
},
"type": "module",
"workspaces": [
"packages/remark-parse",
"packages/remark-stringify",
"packages/remark",
"packages/remark-cli"
],
"devDependencies": {
"@types/mdast": "^3.0.0",
"@types/tape": "^4.0.0",
"c8": "^7.0.0",
"camelcase": "^6.0.0",
"execa": "^5.0.0",
"lerna": "^4.0.0",
"execa": "^6.0.0",
"mdast-util-assert": "^4.0.0",
"mdast-util-gfm": "^1.0.0",
"micromark-extension-gfm": "^1.0.0",
"mdast-util-gfm": "^2.0.0",
"micromark-extension-gfm": "^2.0.0",
"prettier": "^2.0.0",
"remark-preset-wooorm": "^8.0.0",
"remark-preset-wooorm": "^9.0.0",
"rimraf": "^3.0.0",
"tape": "^5.0.0",
"type-coverage": "^2.0.0",
"typescript": "^4.0.0",
"unified": "^10.0.0",
"unist-util-remove-position": "^4.0.0",
"xo": "^0.43.0"
"xo": "^0.46.0"
},
"scripts": {
"postinstall": "lerna bootstrap --no-ci",
"build": "lerna run build && rimraf \"*.d.ts\" \"{test,script}/**/*.d.ts\" && tsc && type-coverage",
"build": "npm run build --workspaces && rimraf \"*.d.ts\" \"{test,script}/**/*.d.ts\" && tsc && type-coverage",
"format": "./packages/remark-cli/cli.js . -qfo && prettier . -w --loglevel warn && xo --fix",
"test-api": "lerna run test && node --conditions development test/index.js",
"test-api": "npm run test --workspaces && node --conditions development test/index.js",
"test-coverage": "c8 --check-coverage --branches 100 --functions 100 --lines 100 --statements 100 --reporter lcov npm run test-api",
"test": "npm run build && npm run format && npm run test-coverage"
},
2 changes: 0 additions & 2 deletions packages/remark-cli/cli.js
Original file line number Diff line number Diff line change
@@ -21,7 +21,6 @@ const extensions = [
]

args({
// @ts-expect-error: fine.
processor: remark,
name: proc.name,
description: cli.description,
@@ -30,7 +29,6 @@ args({
cli.name + ': ' + cli.version
].join(', '),
pluginPrefix: proc.name,
presetPrefix: proc.name + '-preset',
packageField: proc.name + 'Config',
rcName: '.' + proc.name + 'rc',
ignoreName: '.' + proc.name + 'ignore',
2 changes: 1 addition & 1 deletion packages/remark-cli/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "remark-cli",
"version": "10.0.0",
"description": "CLI to process markdown with remark",
"description": "Command line interface to inspect and change markdown files with remark",
"license": "MIT",
"keywords": [
"unified",
320 changes: 270 additions & 50 deletions packages/remark-cli/readme.md

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions packages/remark-cli/test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {URL, fileURLToPath} from 'node:url'
import execa from 'execa'
import {execa} from 'execa'
import test from 'tape'

test('remark-cli', (t) => {
@@ -16,7 +16,7 @@ test('remark-cli', (t) => {
[
'Usage: remark [options] [path | glob ...]',
'',
' CLI to process markdown with remark',
' Command line interface to inspect and change markdown files with remark',
'',
'Options:',
'',
4 changes: 2 additions & 2 deletions packages/remark-parse/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "remark-parse",
"version": "10.0.0",
"description": "remark plugin to parse markdown",
"version": "10.0.1",
"description": "remark plugin to add support for parsing markdown input",
"license": "MIT",
"keywords": [
"unified",
320 changes: 257 additions & 63 deletions packages/remark-parse/readme.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion packages/remark-parse/test.js
Original file line number Diff line number Diff line change
@@ -15,7 +15,7 @@ test('remarkParse', (t) => {
t.test('extensions', (t) => {
const tree = unified()
.data('micromarkExtensions', [gfm()])
.data('fromMarkdownExtensions', [gfmFromMarkdown])
.data('fromMarkdownExtensions', [gfmFromMarkdown()])
.use(remarkParse)
.parse('* [x] contact@example.com ~~strikethrough~~')

8 changes: 6 additions & 2 deletions packages/remark-stringify/lib/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/**
* @typedef {import('mdast').Root|import('mdast').Content} Node
* @typedef {import('mdast-util-to-markdown').Options} Options
* @typedef {import('mdast-util-to-markdown').Options} ToMarkdownOptions
* @typedef {Omit<ToMarkdownOptions, 'extensions'>} Options
*/

import {toMarkdown} from 'mdast-util-to-markdown'
@@ -18,7 +19,10 @@ export default function remarkStringify(options) {
// Note: this option is not in the readme.
// The goal is for it to be set by plugins on `data` instead of being
// passed by users.
extensions: this.data('toMarkdownExtensions') || []
extensions:
/** @type {ToMarkdownOptions['extensions']} */ (
this.data('toMarkdownExtensions')
) || []
})
)
}
4 changes: 2 additions & 2 deletions packages/remark-stringify/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "remark-stringify",
"version": "10.0.0",
"description": "remark plugin to compile markdown",
"version": "10.0.2",
"description": "remark plugin to add support for serializing markdown",
"license": "MIT",
"keywords": [
"unified",
361 changes: 281 additions & 80 deletions packages/remark-stringify/readme.md

Large diffs are not rendered by default.

14 changes: 7 additions & 7 deletions packages/remark-stringify/test.js
Original file line number Diff line number Diff line change
@@ -429,7 +429,7 @@ test('stringify escapes', (t) => {
t.equal(toString('![a'), '!\\[a\n', 'the `[` in `![`')
t.equal(toString('a~b'), 'a~b\n', '`~`')
t.equal(toString('a|b'), 'a|b\n', '`|`')
t.equal(toString('a_b'), 'a_b\n', '`_` (in words)')
t.equal(toString('a_b'), 'a\\_b\n', '`_` (in words)')
t.equal(toString('a _b'), 'a \\_b\n', '`_` after `\\b`')
t.equal(toString('a_ b'), 'a\\_ b\n', '`_` before `\\b`')
t.equal(toString('a:b'), 'a:b\n', '`:`')
@@ -445,19 +445,19 @@ test('stringify escapes', (t) => {
t.equal(toString('+a'), '\\+a\n', '`+` (phrasing)')
t.equal(toString('.a'), '.a\n', '`.`')
t.equal(toString('1.a'), '1.a\n', '`.` (after digit before letter)')
t.equal(toString('1. '), '1\\. \n', '`.` (after digit, with space)')
t.equal(toString('1.\t'), '1\\.\t\n', '`.` (after digit, with tab)')
t.equal(toString('1. '), '1\\.&#x20;\n', '`.` (after digit, with space)')
t.equal(toString('1.\t'), '1\\.&#x9;\n', '`.` (after digit, with tab)')
t.equal(toString('1.\n'), '1\\.\n', '`.` (after digit, with newline)')
t.equal(toString('1.'), '1\\.\n', '`.` (after digit, with EOF)')
t.equal(toString('1.a'), '1.a\n', '`1.` (after digit, before letter)')
t.equal(toString('1. '), '1\\. \n', '`1.` (after digit, with space)')
t.equal(toString('1.\t'), '1\\.\t\n', '`1.` (after digit, with tab)')
t.equal(toString('1. '), '1\\.&#x20;\n', '`1.` (after digit, with space)')
t.equal(toString('1.\t'), '1\\.&#x9;\n', '`1.` (after digit, with tab)')
t.equal(toString('1.\n'), '1\\.\n', '`1.` (after digit, with newline)')
t.equal(toString('1.'), '1\\.\n', '`1.` (after digit, with EOF)')
t.equal(toString(')a'), ')a\n', '`)`')
t.equal(toString('1)a'), '1\\)a\n', '`)` (after digit)')
t.equal(toString('1) '), '1\\) \n', '`)` (after digit, with space)')
t.equal(toString('1)\t'), '1\\)\t\n', '`)` (after digit, with tab)')
t.equal(toString('1) '), '1\\)&#x20;\n', '`)` (after digit, with space)')
t.equal(toString('1)\t'), '1\\)&#x9;\n', '`)` (after digit, with tab)')
t.equal(toString('1)\n'), '1\\)\n', '`)` (after digit, with newline)')
t.equal(toString('1)'), '1\\)\n', '`)` (after digit, with EOL)')
t.equal(toString('a](b'), 'a]\\(b\n', '`(` after `]`')
4 changes: 2 additions & 2 deletions packages/remark/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "remark",
"version": "14.0.1",
"description": "Markdown processor powered by plugins part of the unified collective",
"version": "14.0.2",
"description": "unified processor with support for parsing markdown input and serializing markdown as output",
"license": "MIT",
"keywords": [
"unified",
318 changes: 214 additions & 104 deletions packages/remark/readme.md

Large diffs are not rendered by default.

527 changes: 448 additions & 79 deletions readme.md

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions test/fixtures/tree/amps-and-angles-encoding.json
Original file line number Diff line number Diff line change
@@ -217,8 +217,8 @@
"offset": 125
}
},
"identifier": "1",
"label": "1",
"identifier": "1",
"referenceType": "shortcut"
},
{
@@ -302,8 +302,8 @@
"offset": 216
}
},
"identifier": "2",
"label": "2",
"identifier": "2",
"referenceType": "shortcut"
},
{
2 changes: 1 addition & 1 deletion test/fixtures/tree/case-insensitive-refs.json
Original file line number Diff line number Diff line change
@@ -36,8 +36,8 @@
"offset": 4
}
},
"identifier": "hi",
"label": "hi",
"identifier": "hi",
"referenceType": "shortcut"
}
],
4 changes: 2 additions & 2 deletions test/fixtures/tree/definition-in-list-and-blockquote.json
Original file line number Diff line number Diff line change
@@ -36,8 +36,8 @@
"offset": 10
}
},
"identifier": "1",
"label": "1",
"identifier": "1",
"referenceType": "full"
},
{
@@ -88,8 +88,8 @@
"offset": 22
}
},
"identifier": "2",
"label": "2",
"identifier": "2",
"referenceType": "full"
},
{
2 changes: 1 addition & 1 deletion test/fixtures/tree/definition-newline.json
Original file line number Diff line number Diff line change
@@ -150,8 +150,8 @@
"offset": 124
}
},
"identifier": "baz",
"label": "baz",
"identifier": "baz",
"referenceType": "shortcut"
},
{
6 changes: 3 additions & 3 deletions test/fixtures/tree/links-reference-proto.json
Original file line number Diff line number Diff line change
@@ -52,8 +52,8 @@
"offset": 21
}
},
"identifier": "tostring",
"label": "toString",
"identifier": "tostring",
"referenceType": "full"
},
{
@@ -104,8 +104,8 @@
"offset": 47
}
},
"identifier": "constructor",
"label": "constructor",
"identifier": "constructor",
"referenceType": "full"
},
{
@@ -156,8 +156,8 @@
"offset": 74
}
},
"identifier": "__proto__",
"label": "__proto__",
"identifier": "__proto__",
"referenceType": "full"
},
{
Original file line number Diff line number Diff line change
@@ -52,8 +52,8 @@
"offset": 13
}
},
"identifier": "1",
"label": "1",
"identifier": "1",
"referenceType": "shortcut"
},
{
@@ -137,8 +137,8 @@
"offset": 28
}
},
"identifier": "1",
"label": "1",
"identifier": "1",
"referenceType": "full"
},
{
@@ -222,8 +222,8 @@
"offset": 44
}
},
"identifier": "1",
"label": "1",
"identifier": "1",
"referenceType": "shortcut"
},
{
@@ -326,8 +326,8 @@
"offset": 101
}
},
"identifier": "b",
"label": "b",
"identifier": "b",
"referenceType": "shortcut"
},
{
@@ -411,8 +411,8 @@
"offset": 122
}
},
"identifier": "once",
"label": "once",
"identifier": "once",
"referenceType": "collapsed"
},
{
@@ -496,8 +496,8 @@
"offset": 143
}
},
"identifier": "twice",
"label": "twice",
"identifier": "twice",
"referenceType": "collapsed"
},
{
@@ -581,8 +581,8 @@
"offset": 165
}
},
"identifier": "thrice",
"label": "thrice",
"identifier": "thrice",
"referenceType": "collapsed"
},
{
@@ -792,8 +792,8 @@
"offset": 289
}
},
"identifier": "this",
"label": "this",
"identifier": "this",
"referenceType": "shortcut"
},
{
@@ -844,8 +844,8 @@
"offset": 296
}
},
"identifier": "this",
"label": "this",
"identifier": "this",
"referenceType": "shortcut"
},
{
@@ -929,8 +929,8 @@
"offset": 332
}
},
"identifier": "this",
"label": "this",
"identifier": "this",
"referenceType": "full"
},
{
@@ -1014,8 +1014,8 @@
"offset": 345
}
},
"identifier": "this",
"label": "this",
"identifier": "this",
"referenceType": "shortcut"
},
{
@@ -1099,8 +1099,8 @@
"offset": 363
}
},
"identifier": "this",
"label": "this",
"identifier": "this",
"referenceType": "collapsed"
},
{
@@ -1184,8 +1184,8 @@
"offset": 376
}
},
"identifier": "this",
"label": "this",
"identifier": "this",
"referenceType": "shortcut"
},
{
@@ -1368,8 +1368,8 @@
"offset": 463
}
},
"identifier": "this",
"label": "this",
"identifier": "this",
"referenceType": "collapsed"
},
{
@@ -1453,8 +1453,8 @@
"offset": 495
}
},
"identifier": "this",
"label": "this",
"identifier": "this",
"referenceType": "shortcut"
},
{
@@ -1689,8 +1689,8 @@
"offset": 670
}
},
"identifier": "link breaks",
"label": "link\nbreaks",
"identifier": "link breaks",
"referenceType": "shortcut"
},
{
@@ -1774,8 +1774,8 @@
"offset": 725
}
},
"label": "link \nbreaks",
"identifier": "link breaks",
"label": "link\nbreaks",
"referenceType": "shortcut"
},
{
Original file line number Diff line number Diff line change
@@ -52,8 +52,8 @@
"offset": 25
}
},
"identifier": "simple case",
"label": "simple case",
"identifier": "simple case",
"referenceType": "shortcut"
},
{
@@ -156,8 +156,8 @@
"offset": 81
}
},
"identifier": "line break",
"label": "line\nbreak",
"identifier": "line break",
"referenceType": "shortcut"
},
{
@@ -241,8 +241,8 @@
"offset": 112
}
},
"label": "line \nbreak",
"identifier": "line break",
"label": "line\nbreak",
"referenceType": "shortcut"
},
{
@@ -329,8 +329,8 @@
"offset": 167
}
},
"identifier": "this",
"label": "this",
"identifier": "this",
"referenceType": "shortcut"
},
{
@@ -381,8 +381,8 @@
"offset": 174
}
},
"identifier": "that",
"label": "that",
"identifier": "that",
"referenceType": "shortcut"
},
{
@@ -433,8 +433,8 @@
"offset": 190
}
},
"identifier": "other",
"label": "other",
"identifier": "other",
"referenceType": "shortcut"
}
],
2 changes: 1 addition & 1 deletion test/fixtures/tree/main.json
Original file line number Diff line number Diff line change
@@ -105,8 +105,8 @@
"offset": 237
}
},
"identifier": "test",
"label": "test",
"identifier": "test",
"referenceType": "full"
},
{
6 changes: 3 additions & 3 deletions test/fixtures/tree/markdown-documentation-basics.json
Original file line number Diff line number Diff line change
@@ -136,8 +136,8 @@
"offset": 700
}
},
"identifier": "s",
"label": "s",
"identifier": "s",
"referenceType": "shortcut"
},
{
@@ -221,8 +221,8 @@
"offset": 1050
}
},
"identifier": "d",
"label": "d",
"identifier": "d",
"referenceType": "shortcut"
},
{
@@ -339,8 +339,8 @@
"offset": 1278
}
},
"identifier": "src",
"label": "src",
"identifier": "src",
"referenceType": "shortcut"
},
{
22 changes: 11 additions & 11 deletions test/fixtures/tree/markdown-documentation-syntax.json
Original file line number Diff line number Diff line change
@@ -1584,8 +1584,8 @@
"offset": 1232
}
},
"identifier": "src",
"label": "src",
"identifier": "src",
"referenceType": "full"
},
{
@@ -1768,8 +1768,8 @@
"offset": 1746
}
},
"identifier": "1",
"label": "1",
"identifier": "1",
"referenceType": "shortcut"
},
{
@@ -1820,8 +1820,8 @@
"offset": 1757
}
},
"identifier": "2",
"label": "2",
"identifier": "2",
"referenceType": "shortcut"
},
{
@@ -1872,8 +1872,8 @@
"offset": 1772
}
},
"identifier": "3",
"label": "3",
"identifier": "3",
"referenceType": "shortcut"
},
{
@@ -1924,8 +1924,8 @@
"offset": 1796
}
},
"identifier": "4",
"label": "4",
"identifier": "4",
"referenceType": "shortcut"
},
{
@@ -1976,8 +1976,8 @@
"offset": 1813
}
},
"identifier": "5",
"label": "5",
"identifier": "5",
"referenceType": "shortcut"
},
{
@@ -2028,8 +2028,8 @@
"offset": 1831
}
},
"identifier": "6",
"label": "6",
"identifier": "6",
"referenceType": "shortcut"
},
{
@@ -4371,8 +4371,8 @@
"offset": 7417
}
},
"identifier": "bq",
"label": "bq",
"identifier": "bq",
"referenceType": "full"
},
{
@@ -4423,8 +4423,8 @@
"offset": 7453
}
},
"identifier": "l",
"label": "l",
"identifier": "l",
"referenceType": "full"
},
{
@@ -4562,8 +4562,8 @@
"offset": 7646
}
},
"identifier": "1",
"label": "1",
"identifier": "1",
"referenceType": "shortcut"
},
{
@@ -4614,8 +4614,8 @@
"offset": 7660
}
},
"identifier": "2",
"label": "2",
"identifier": "2",
"referenceType": "shortcut"
},
{
8 changes: 4 additions & 4 deletions test/fixtures/tree/nested-references.json
Original file line number Diff line number Diff line change
@@ -55,8 +55,8 @@
"offset": 44
}
},
"identifier": "bar",
"label": "bar",
"identifier": "bar",
"referenceType": "full"
}
],
@@ -72,8 +72,8 @@
"offset": 50
}
},
"identifier": "baz",
"label": "baz",
"identifier": "baz",
"referenceType": "full"
}
],
@@ -174,8 +174,8 @@
"offset": 98
}
},
"identifier": "bar",
"label": "bar",
"identifier": "bar",
"referenceType": "full"
},
{
@@ -226,8 +226,8 @@
"offset": 104
}
},
"identifier": "baz",
"label": "baz",
"identifier": "baz",
"referenceType": "shortcut"
}
],
2 changes: 1 addition & 1 deletion test/fixtures/tree/ref-paren.json
Original file line number Diff line number Diff line change
@@ -36,8 +36,8 @@
"offset": 4
}
},
"identifier": "hi",
"label": "hi",
"identifier": "hi",
"referenceType": "shortcut"
}
],
2 changes: 1 addition & 1 deletion test/fixtures/tree/reference-image-empty-alt.json
Original file line number Diff line number Diff line change
@@ -19,8 +19,8 @@
"offset": 6
}
},
"identifier": "1",
"label": "1",
"identifier": "1",
"referenceType": "full"
}
],
12 changes: 6 additions & 6 deletions test/fixtures/tree/reference-link-escape.nooutput.json
Original file line number Diff line number Diff line change
@@ -36,8 +36,8 @@
"offset": 10
}
},
"identifier": "b\\*r*",
"label": "b*r*",
"identifier": "b\\*r*",
"referenceType": "full"
},
{
@@ -88,8 +88,8 @@
"offset": 21
}
},
"identifier": "b\\*r*",
"label": "b*r*",
"identifier": "b\\*r*",
"referenceType": "collapsed"
},
{
@@ -140,8 +140,8 @@
"offset": 30
}
},
"identifier": "b\\*r*",
"label": "b*r*",
"identifier": "b\\*r*",
"referenceType": "shortcut"
},
{
@@ -192,8 +192,8 @@
"offset": 46
}
},
"identifier": "b\\*r*",
"label": "b*r*",
"identifier": "b\\*r*",
"referenceType": "full"
},
{
@@ -227,8 +227,8 @@
"offset": 58
}
},
"identifier": "b\\*r*",
"label": "b*r*",
"identifier": "b\\*r*",
"referenceType": "collapsed"
},
{
@@ -262,8 +262,8 @@
"offset": 68
}
},
"identifier": "b\\*r*",
"label": "b*r*",
"identifier": "b\\*r*",
"referenceType": "shortcut"
},
{
2 changes: 1 addition & 1 deletion test/fixtures/tree/reference-link-with-angle-brackets.json
Original file line number Diff line number Diff line change
@@ -36,8 +36,8 @@
"offset": 5
}
},
"identifier": "foo",
"label": "foo",
"identifier": "foo",
"referenceType": "shortcut"
}
],
Original file line number Diff line number Diff line change
@@ -36,8 +36,8 @@
"offset": 5
}
},
"identifier": "foo",
"label": "foo",
"identifier": "foo",
"referenceType": "shortcut"
}
],