-
-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Readme example doesn't work #12
Comments
The type error is expected Lines 52 to 53 in ee9c7d8
For the tokenize error, could you try isolating it some more? |
This comment has been minimized.
This comment has been minimized.
The error seems to stem from
I'll try to investigate some more. |
I just ran the readme example from import {fromHtml} from 'hast-util-from-html'
import {toNlcst} from 'hast-util-to-nlcst'
import {ParseEnglish} from 'parse-english'
import {read} from 'to-vfile'
import {inspect} from 'unist-util-inspect'
const file = await read('example.html')
const tree = fromHtml(file)
console.log(inspect(toNlcst(tree, file, ParseEnglish))) It seems to work fine. In any event, it seems the On the other hand, since |
Related-to: remarkjs/remark-retext@d98329e Related-to: #12
I had a local note somewhere about how I thought there was a bug here, which was likely fixed in There remains a TypeScript error here though, where it cannot handle the two overloads of this plugin in the |
Fixed in 5.0.0! |
Initial checklist
Affected packages and versions
[email protected]
Link to runnable example
https://stackblitz.com/edit/github-mfdkiw?file=example.js
Steps to reproduce
node example.js
Expected behavior
As per readme, I expected
and
to be logged.
Actual behavior
The following error is logged.
Note: When using TypeScript, there's also the following type error:
I removed TS from the reproduction to keep it truly minimal, however.
Runtime
No response
Package manager
No response
OS
No response
Build and bundle tools
No response
Addendum: Curiously enough, on Safari the minimal repro doesn't consistently log the error for me (it still doesn't work, though). On Chrome and Firefox the error is logged consistently. This feels like it's probably unrelated to this project, however.
The text was updated successfully, but these errors were encountered: