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: Now import the plugin, and pass it your jargon:
```js ```js
var remark = require('remark') import rehypeJargon from 'rehype-jargon'
var html = require('remark-html') import { jargon } from './jargon.js'
var plugin = require('remark-jargon') import {read} from 'to-vfile'
var jargon = require('./jargon.js') import {unified} from 'unified'
remark() const file = await unified()
.use(html) .use(rehypeJargon, {jargon: jargon})
.use(plugin, { jargon: jargon }) .process('This is a plugin for _rehype_ originally written for _freesewing_.', function (err, file) {
.process('This is a plugin for _remark_ originally written for _freesewing_.', function (err, file) {
console.log(String(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). [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? 🤔 ## What am I looking at? 🤔
This repository is the FreeSewing *monorepo* holding all FreeSewing's websites, documentation, designs, plugins, and other NPM packages. This repository is the FreeSewing *monorepo* holding all FreeSewing's websites, documentation, designs, plugins, and other NPM packages.