# remark-critic-markup

> CriticMarkup transformer plugin for Remark

Latest version **1.0.1** (published 2022-08-27) · MIT license · 0 weekly downloads

## Install

```sh
npm install remark-critic-markup
pnpm add remark-critic-markup
yarn add remark-critic-markup
bun add remark-critic-markup
```

## Health

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

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2022-08-27 |
| First published | 2022-08-27 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 5.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Benbinbin |
| Maintainers | benbinbin |
| Keywords | remark, remark-plugin, CriticMarkup, markdown |

## Links

- npm: https://www.npmjs.com/package/remark-critic-markup
- Repository: https://github.com/Benbinbin/remark-critic-markup
- Homepage: https://github.com/Benbinbin/remark-critic-markup#readme
- Issues: https://github.com/Benbinbin/remark-critic-markup/issues
- npm.io page: https://npm.io/package/remark-critic-markup

## Dependencies (1)

- [unist-util-visit](https://npm.io/package/unist-util-visit.md) ^4.1.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

- 1.0.1 (latest) — 2022-08-27
- 1.0.0 — 2022-08-27

## README

# remark-critic-markup
This is a remark plugin to make markdown support [the CriticMarkup syntax](https://github.com/CriticMarkup/CriticMarkup-toolkit#the-basic-syntax).

this plugin provides a transformer to match the basic syntax of CriticMarkup:

**Addition**

* markdown content: `++addition++`
* generate HTML: `<ins class="critic addition">addition</ins>`

**Deletion**

* markdown content: `--deletion--`
* generate HTML: `<del class="critic deletion">deletion</del>`

**Substitution**:

* markdown content: `~~remove~>substitution~~`

    :warning: this syntax may conflict with the remark-gfm [strikethrough syntax](https://github.com/remarkjs/remark-gfm), maybe this syntax can be replaced by Addition and Deletion syntax

    ***so this redundant syntax won't transform in this package***

**Comment**

* syntax(origin): `>>comment<<`

    :warning: this syntax may conflict with the markdown [blockquote syntax](https://commonmark.org/help/)

* markdown content(adjust): `//comment//`

* generate HTML: `<span class="critic comment">comment</span>`

**Highlight**

* markdown content: `==highlight==`

* generate HTML: `<mark class="critic highlight">highlight</mark>`


## Install

```bash
npm install remark-critic-markup
```

## Usage

```js
import {remark} from 'remark';
import remarkCriticMarkup from 'remark-critic-markup';

const doc = 'These are some contents satisfy criticMarkup syntax ++addition++ --deletion-- //comment// ==highlight==';
remark().use(remarkCriticMarkup).process(doc).then(file => {
    console.log(String(file));
});
```

## License
[MIT](./LICENSE)

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