# @unified-myst/process-roles-directives

> Utility for walking the AST and applying processors to roles and directives.

Latest version **0.0.2** (published 2022-04-06) · MIT license · 0 weekly downloads

## Install

```sh
npm install @unified-myst/process-roles-directives
pnpm add @unified-myst/process-roles-directives
yarn add @unified-myst/process-roles-directives
bun add @unified-myst/process-roles-directives
```

## Health

**Score 30/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.2 |
| Published | 2022-04-06 |
| First published | 2022-03-31 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM |
| Dependencies | 2 |
| Unpacked size | 37.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 6 |
| Author | Chris Sewell |
| Maintainers | chrisjsewell |
| Keywords | myst, mdast, unified, micromark |

## Links

- npm: https://www.npmjs.com/package/@unified-myst/process-roles-directives
- Repository: https://github.com/executablebooks/unified-myst
- Homepage: https://github.com/executablebooks/unified-myst/tree/main/packages/process-roles-directives#readme
- Issues: https://github.com/executablebooks/unified-myst/issues
- npm.io page: https://npm.io/package/@unified-myst/process-roles-directives

## Dependencies (2)

- [unist-util-visit](https://npm.io/package/unist-util-visit.md) ^4.1.0
- [micromark-util-normalize-identifier](https://npm.io/package/micromark-util-normalize-identifier.md) ^1.0.0

## Alternatives

- [@mdxeditor/editor](https://npm.io/package/@mdxeditor/editor.md) — 962.4K weekly downloads
- [mmdb-lib](https://npm.io/package/mmdb-lib.md) — 680.9K weekly downloads
- [playcanvas](https://npm.io/package/playcanvas.md) — 36.2K weekly downloads
- [@glw907/cairn-cms](https://npm.io/package/@glw907/cairn-cms.md) — 967 weekly downloads
- [markdown-to-confluence](https://npm.io/package/markdown-to-confluence.md) — 103 weekly downloads

## Recent versions

- 0.0.2 (latest) — 2022-04-06
- 0.0.1 — 2022-03-31

## README

# `@unified-myst/process-roles-directives`

Utility for walking the AST and applying processors to roles and directives.

Note this package does not actually implement the processors.

Definition and footnote identifiers are scoped, such that content in a role or directive can only reference definitions/footnotes, specified within that directive, or specified in a parent construct, e.g.

``````markdown
```{note}
This can reference [a] and [b]

[b]: https://other.com
```
```{note}
This can reference [a] but NOT [b]
```
[a]: https://example.com
``````

## TODO

For directives, currently [Code](https://github.com/syntax-tree/mdast#code) nodes are searched for, where the code language is of the correct form (`{name}`).
Ideally though, directive syntax would be directly parsed at the token level, and the (unprocessed) node generated.
This probably requires <https://github.com/executablebooks/myst-spec/issues/7>

Make more performant (reduce tree walks)?

---
_Source: https://npm.io/package/@unified-myst/process-roles-directives · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
