Skip to content
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

fix: improve compatibility with other plugins #20

Closed
Robot-Inventor opened this issue Mar 17, 2024 · 2 comments · Fixed by #67
Closed

fix: improve compatibility with other plugins #20

Robot-Inventor opened this issue Mar 17, 2024 · 2 comments · Fixed by #67
Assignees
Labels
fix Something isn't working

Comments

@Robot-Inventor
Copy link
Owner

If the heading already has an id set by another plugin, use it; otherwise, set the id.

@Robot-Inventor Robot-Inventor added the fix Something isn't working label Mar 17, 2024
@Robot-Inventor Robot-Inventor self-assigned this Mar 20, 2024
@Robot-Inventor
Copy link
Owner Author

Since Astro sets the id of the headings in rehype, it is not possible to get the id from the remark plugin.

ref: https://github.com/withastro/astro/blob/297571eb98509a63f894d6fff912775b637a1482/packages/markdown/remark/src/rehype-collect-headings.ts

@Robot-Inventor Robot-Inventor linked a pull request May 16, 2024 that will close this issue
Robot-Inventor added a commit that referenced this issue May 16, 2024
* feat: improve compatibility with other plugins #20

* fix an ESLint error
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant