-
-
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
example code does not work (anymore): content is unchanged #85
Comments
I've found out how to get it working for me. The readme has this line of code - which doesn't work: var section = require('rehype-section'); I finally got it working via either: var section = require('@agentofuser/rehype-section').default or: import sectionParent from '@agentofuser/rehype-section';
const section = sectionParent.default; I'm pretty sure this unintentional. Interestingly, the internal test case in In the test I can either keep the existing line: import section from '../src/.' or I can replace it with: const section = require('../src/.').default So one kind of import is working as expected, the other one isn't. |
Thank you! This saves my day. 😭 |
I'm using import section from '@agentofuser/rehype-section' and am also experiencing this issue: content remains unchanged. This should import the default import, but instead it gives an object with a
|
The code and type definitions for this package are still broken. I have to use this as a workaround to 1) get it to work at all and 2) get TypeScript to stop complaining: import _rehypeSection from '@agentofuser/rehype-section'
const rehypeSection = (_rehypeSection as any).default |
I've tried to use the example code from the readme.
When using @agentofuser/rehype-section version 1.0.5 the resulting output is the same as the input - no section elements are added for me.
When using version 0.1.2 it still works as expected.
Has the API changed?
I'll test this on a different computer tomorrow to verify this is independent of my local machine.
The text was updated successfully, but these errors were encountered: