You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix Usage as a remark plugin without Gatsby example code (#229)
* Fix Usage as a remark plugin without Gatsby example code
The example in the Usage as a remark plugin without Gatsby does not compile as is:
- Top-level await only available in ES Modules but used here with require() – decided to go with the former and use imports
- Backticks not escaped in template string
- Incorrect module name (`remarkParse` should be `remark-parse`)
- Incorrect property reference in result returned from processor (`contents` should be `value`)
I also added the npm install line required and a suggestion of the file name to use (including _.mjs_ extension) to make it easier to follow and avoid possible trip-ups.
* Remove log statement
Copy file name to clipboardExpand all lines: README.md
+19-11
Original file line number
Diff line number
Diff line change
@@ -557,24 +557,32 @@ Line numbers and ranges aren’t the only things you can pass as options on your
557
557
558
558
### Usage as a remark plugin without Gatsby
559
559
560
-
This package exports a `remarkPlugin` property that accepts the same [options](#options-reference) as the main Gatsby plugin and is usable as a [remark](https://github.com/remarkjs/remark) plugin in any [unifiedjs](https://github.com/unifiedjs/unified) processing pipeline:
560
+
This package exports a `remarkPlugin` property that accepts the same [options](#options-reference) as the main Gatsby plugin and is usable as a [remark](https://github.com/remarkjs/remark) plugin in any [unifiedjs](https://github.com/unifiedjs/unified) processing pipeline.
0 commit comments