# remark-fix-guillemets

> This plugin fixes `typographic-plugin` when used together with `remark-parse`.

Latest version **1.1.3** (published 2024-04-27) · MIT license · 0 weekly downloads

## Install

```sh
npm install remark-fix-guillemets
pnpm add remark-fix-guillemets
yarn add remark-fix-guillemets
bun add remark-fix-guillemets
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 1.1.3 |
| Published | 2024-04-27 |
| First published | 2017-06-30 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 5.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 237 |
| Author | Sébastien |
| Maintainers | situphen, talone |
| Keywords | remark |

## Links

- npm: https://www.npmjs.com/package/remark-fix-guillemets
- Repository: https://github.com/zestedesavoir/zmarkdown.git#master
- Homepage: https://github.com/zestedesavoir/zmarkdown/tree/master#readme
- Issues: https://github.com/zestedesavoir/zmarkdown/issues
- npm.io page: https://npm.io/package/remark-fix-guillemets

## Dependencies (1)

- [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

- 1.1.3 (latest) — 2024-04-27
- 1.1.2 — 2022-12-15
- 1.1.1 — 2021-02-14
- 1.1.0 — 2020-02-03
- 1.0.20 — 2019-07-27
- 1.0.19 — 2019-04-14
- 1.0.18 — 2019-02-04
- 1.0.17 — 2018-11-23
- 1.0.16 — 2018-10-04
- 1.0.15 — 2018-08-09
- 1.0.14 — 2018-07-22
- 1.0.13 — 2018-07-20
- 1.0.12 — 2018-03-06
- 1.0.11 — 2018-02-21
- 1.0.10 — 2018-01-20
- … 13 more at https://npm.io/package/remark-fix-guillemets/versions

## README

# remark-fix-guillemets [![Build Status][build-badge]][build-status] [![Coverage Status][coverage-badge]][coverage-status]

This plugin fixes `typographic-plugin` when used together with `remark-parse`.

## Motivation

When `<<a>>` is parsed by `remark-parse` the resulting tree is:

```
root[1] (1:1-1:6, 0-5)
└─ paragraph[3] (1:1-1:6, 0-5)
   ├─ text: "<" (1:1-1:2, 0-1)
   ├─ html: "<a>" (1:2-1:5, 1-4)
   └─ text: ">" (1:5-1:6, 0-1)
```

As you see here `<<` got split into a text node `<` and an HTML node.
Since [remark-textr][remark-textr] only gets applied to 'text' nodes, `<<` is not replaced by `«`.

This plugin replaces the previous tree with:
```
root[1] (1:1-1:6, 0-5)
└─ paragraph[1] (1:1-1:6, 0-5)
   └─ text: "<<a>>" (1:1-1:6, 0-5)
```

## Install

[npm][npm]:

```sh
npm install --save remark-fix-guillemets
```


## Usage

Dependencies:

```javascript
const unified = require('unified')
const remarkParse = require('remark-parse')
const stringify = require('rehype-stringify')
const remark2rehype = require('remark-rehype')

const remarkFixGuillemets = require('remark-fix-guillemets')
```

Usage:

```javascript
unified()
  .use(remarkParse)
  .use(remarkFixGuillemets)
  .use(remark2rehype)
  .use(stringify)
```


## License

[MIT][license] © [Zeste de Savoir][zds]

<!-- Definitions -->

[build-badge]: https://img.shields.io/travis/zestedesavoir/zmarkdown.svg

[build-status]: https://travis-ci.org/zestedesavoir/zmarkdown

[coverage-badge]: https://img.shields.io/coveralls/zestedesavoir/zmarkdown.svg

[coverage-status]: https://coveralls.io/github/zestedesavoir/zmarkdown

[license]: https://github.com/zestedesavoir/zmarkdown/blob/master/packages/remark-fix-guillemets/LICENSE-MIT

[zds]: https://zestedesavoir.com

[npm]: https://www.npmjs.com/package/remark-fix-guillemets

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

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