# commonmark-wikiwords

> Convert WikiWords to links in commonmark source

Latest version **3.1.0** (published 2020-06-12) · ISC license · 0 weekly downloads

## Install

```sh
npm install commonmark-wikiwords
pnpm add commonmark-wikiwords
yarn add commonmark-wikiwords
bun add commonmark-wikiwords
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 3.1.0 |
| Published | 2020-06-12 |
| First published | 2019-07-09 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 12 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Wilfred Hughes |
| Maintainers | wilfredh |
| Keywords | commonmark, wiki, wikiwords |

## Links

- npm: https://www.npmjs.com/package/commonmark-wikiwords
- Repository: https://github.com/Wilfred/commonmark-wikiwords
- Homepage: https://github.com/Wilfred/commonmark-wikiwords#readme
- Issues: https://github.com/Wilfred/commonmark-wikiwords/issues
- npm.io page: https://npm.io/package/commonmark-wikiwords

## Dependencies (1)

- [commonmark](https://npm.io/package/commonmark.md) ^0.29.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

- 3.1.0 (latest) — 2020-06-12
- 3.0.0 — 2019-12-01
- 2.4.0 — 2019-11-20
- 2.3.0 — 2019-08-13
- 2.2.0 — 2019-07-30
- 2.1.0 — 2019-07-27
- 2.0.0 — 2019-07-21
- 1.1.0 — 2019-07-09
- 1.0.0 — 2019-07-09

## README

# WikiWords for commonmark.js [![CircleCI](https://circleci.com/gh/Wilfred/commonmark-wikiwords.svg?style=svg)](https://circleci.com/gh/Wilfred/commonmark-wikiwords)[![codecov](https://codecov.io/gh/Wilfred/commonmark-wikiwords/branch/master/graph/badge.svg)](https://codecov.io/gh/Wilfred/commonmark-wikiwords)

This package offers an AST transformer for adding WikiWords syntax to
CommonMark.

## Usage

```javascript
var commonmark = require("commonmark");
var wikiwords = require("commonmark-wikiwords");

var reader = new commonmark.Parser();
var writer = new commonmark.HtmlRenderer();

var parsed = reader.parse(src);
var transformed = wikiwords.transform(parsed);

var htmlSrc = writer.render(transformed);
```

## WikiWord Syntax

This package has a looser definition of WikiWords.

In addition to `FooBar` and `FooBarBaz`, it supports `FooBBar` and
`FooB`.

This follow the [exact definition of WikiCase on C2
Wiki](http://wiki.c2.com/?WikiCase), which does not allow these. If
strict compliance is useful, please file a bug.

To avoid forming wikiwords, [C2 suggests embedding an empty
string](http://wiki.c2.com/?SixSingleQuotes). You can do something
similar in commonmark: `Foo<!-- -->Bar`.

## Highlighting Nonexistent Links

You can also pass a callback to style links based on their name. This
is useful for styling links that don't yet exist.

```javascript
var commonmark = require("commonmark");
var wikiwords = require("commonmark-wikiwords");

var reader = new commonmark.Parser();
var writer = new commonmark.HtmlRenderer();

var parsed = reader.parse(src);
var transformed = wikiwords.transform(parsed, name =>
  name === "foo" ? "exciting-page" : null
);

var htmlSrc = writer.render(transformed);
```

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