Closed Josh-Cena closed 2 years ago
@cmfcmf Is it possible that we use a fail-safe strategy and just return ""
for all nodes whose type we don't know?
Thank you @Josh-Cena for submitting this PR! It looks good :)
@cmfcmf Is it possible that we use a fail-safe strategy and just return
""
for all nodes whose type we don't know?
Fair point. I made it a hard error so that people would notice if some element type was missing instead of silently getting possibly wrong results. But I also see the point of not unnecessarily breaking everyone's builds. I have changed it like you suggested, but to also output a warning message that requests users to open an issue. That should be a good middle ground.
Fix #64.
In Docusaurus beta.7, comments are no longer removed from the build output. (https://github.com/facebook/docusaurus/pull/5629) This has caused the issue https://github.com/facebook/docusaurus/issues/5716. This PR makes the plugin handle comment nodes properly.