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. โ๏ธ
