1
0
Fork 0

fix: rehype not remark

This commit is contained in:
Stefano Cislaghi 2024-01-21 19:11:16 +00:00
parent 0a03065b26
commit 5bea21d68f

View file

@ -85,15 +85,14 @@ export const jargon = {
Now import the plugin, and pass it your jargon:
```js
var remark = require('remark')
var html = require('remark-html')
var plugin = require('remark-jargon')
var jargon = require('./jargon.js')
import rehypeJargon from 'rehype-jargon'
import { jargon } from './jargon.js'
import {read} from 'to-vfile'
import {unified} from 'unified'
remark()
.use(html)
.use(plugin, { jargon: jargon })
.process('This is a plugin for _remark_ originally written for _freesewing_.', function (err, file) {
const file = await unified()
.use(rehypeJargon, {jargon: jargon})
.process('This is a plugin for _rehype_ originally written for _freesewing_.', function (err, file) {
console.log(String(file))
})
```
@ -172,13 +171,6 @@ For help or feedback, please stop by [the FreeSewing chat room](https://gitter.i
[create an issue](https://github.com/freesewing/freesewing/issues/new).
## Use with Gatsby
Please see [gatsby-remark-jargon](https://github.com/freesewing/freesewing/tree/develop/packages/gatsby-remark-jargon) for
info and instructions on how to use this plugin with [Gatsby](https://www.gatsbyjs.org/).
## What am I looking at? 🤔
This repository is the FreeSewing *monorepo* holding all FreeSewing's websites, documentation, designs, plugins, and other NPM packages.