Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix unused markdown directives warning #3013

Merged
merged 2 commits into from
Nov 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 9 additions & 12 deletions docs/parser.md
Original file line number Diff line number Diff line change
Expand Up @@ -348,18 +348,18 @@ When a plugin is specified multiple times, only the first options are considered

- `decoratorsBeforeExport` (`boolean`)

By default decorators on exported classes can be placed either before or after the `export` keyword. When this option is set, decorators will only be allowed in the specified position.
By default decorators on exported classes can be placed either before or after the `export` keyword. When this option is set, decorators will only be allowed in the specified position.

```js title="JavaScript"
// decoratorsBeforeExport: true
@dec
export class C {}
```js title="JavaScript"
// decoratorsBeforeExport: true
@dec
export class C {}

// decoratorsBeforeExport: false
export @dec class C {}
```
// decoratorsBeforeExport: false
export @dec class C {}
```

:::caution
:::caution

This option is deprecated and will be removed in a future version. Code that is valid when this option is explicitly set to `true` or `false` is also valid when this option is not set.
:::
Expand Down Expand Up @@ -421,16 +421,13 @@ When a plugin is specified multiple times, only the first options are considered

:::babel7


- `importAttributes`:

- `deprecatedAssertSyntax` (`boolean`, defaults to `false`)

When `true`, allow parsing an old version of the import attributes, which used the `assert` keyword instead of `with`.

:::babel7
This matches the syntax originally supported by the `importAssertions` parser plugin.
:::

:::

Expand Down
4 changes: 3 additions & 1 deletion website/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,10 @@ function remarkDirectiveBabel8Plugin({ renderBabel8 }) {
children.splice(index, 1, ...node.children);
}
} else {
transformer(node); // for support inside ::tip, etc
transformer(node); // inside :::tip, etc
}
} else if (Array.isArray(node.children)) {
transformer(node); // inside list items
}
}
};
Expand Down