# remark-curly-comments

> plugin to support comments

Latest version **0.2.0** (published 2021-05-03) · MIT license · 0 weekly downloads

## Install

```sh
npm install remark-curly-comments
pnpm add remark-curly-comments
yarn add remark-curly-comments
bun add remark-curly-comments
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.0 |
| Published | 2021-05-03 |
| First published | 2021-05-03 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 7.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Toru Furukawa |
| Maintainers | torufurukawa |
| Keywords | remark, CriticMarkup |

## Links

- npm: https://www.npmjs.com/package/remark-curly-comments
- Repository: https://github.com/torufurukawa/remark-curly-comments
- Homepage: https://github.com/torufurukawa/remark-curly-comments#readme
- Issues: https://github.com/torufurukawa/remark-curly-comments/issues
- npm.io page: https://npm.io/package/remark-curly-comments

## Dependencies (2)

- [unist-util-is](https://npm.io/package/unist-util-is.md) ^4.1.0
- [unist-util-visit](https://npm.io/package/unist-util-visit.md) ^2.0.3

## 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.2.0 (latest) — 2021-05-03
- 0.1.1 — 2021-05-03
- 0.1.0 — 2021-05-03

## README

# remark-curly-comments
[**remark**][remark] plugin to support comments.

## Install

```sh
npm install remark-breaks
```

## Use

Suppose we have a Markdown text and script as follows:

```js
import unified from 'unified'
import markdown from 'remark-parse'
import remark2rehype from 'remark-rehype'
import html from 'rehype-stringify'
import comments from 'remark-curly-comments'

const text = 'Hello, {#fix typo}world!'

const result = unified()
    .use(markdown)
    .use(comments)
    .use(remark2rehype)
    .use(html)
    .processSync(text)

console.log(result.toString())
```

Now, running the script yields:

```html
<p>Hello, <comment>fix typo</comment>world!</p>
```

## API

### `remark().use(comments)`

Plugin to add comments support.

## remark-react

If you use rehype-react and want to replace `<comment>` tag with your own component, pass `component` object to rehype-react transformer:

```js
import unified from 'unified'
import markdown from 'remark-parse'
import remark2rehype from 'remark-rehype'
import rehype2react from 'rehype-react'
import html from 'rehype-stringify'
import comments from 'remark-curly-comments'

const content = unified()
  .use(markdown)
  .use(comments)
  .use(remark2rehype)
  .use(rehype2react, {
    createElement: React.createElement,
    components: {comment: Comment}
  })
  .processSync(content)
```

## License

MIT © Toru Furukawa

---
_Source: https://npm.io/package/remark-curly-comments · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
