remark-utf8

January 10, 2019 ยท View on GitHub

Remark plugin to transform basic markdown into utf8 special characters. Useful for when your output is going into plaintext, not HTML.

Basic Usage

$ yarn add remark-utf8
// or
$ npm install remark-utf8
import remark from "remark";
import utf8 from "remark-utf8";

const markdownString = `
    Just open sourced **remark-utf8** as a standalone plugin. Use _emphasis_, \`monospace fonts\` and **bolds** wherever. Careful about those screen readers tho โœŒ๏ธ

    https://github.com/Swizec/remark-utf8
`;

remark()
    .use(utf8)
    .process(markdownString, function(err, output) {
        console.log(output.contents);
    });

Outputs something like:

Just open sourced ๐—ฟ๐—ฒ๐—บ๐—ฎ๐—ฟ๐—ธ-๐˜‚๐˜๐—ณ๐Ÿด as a standalone plugin. Use ๐˜ฆ๐˜ฎ๐˜ฑ๐˜ฉ๐˜ข๐˜ด๐˜ช๐˜ด, ๐š–๐š˜๐š—๐š˜๐šœ๐š™๐šŠ๐šŒ๐šŽ ๐š๐š˜๐š—๐š๐šœ and ๐—ฏ๐—ผ๐—น๐—ฑ๐˜€ wherever. Careful about those screen readers tho โœŒ๏ธ

https://github.com/Swizec/remark-utf8

Use responsibly.

Warning

This messes with screen readers. Make sure you are okay with inaccessible text before using this. โœŒ๏ธ