Why hast has tagName&proporites but unist declaring same props as 'data' prop?
It is no rules which Node props may have custom syntax tree? Can i just name all node props & make Node inherit rules as i want, deploy at least 100 packages (one func per package for sure) to deal with my syntax, name it cust (custom syntax tree) and join unified family?
Set title tag contet taken from the first h1 tag
What I'd like to achive is to set title tag contet taken from the first h1 tag. Already managed to find the first h1 in the hast and take its contet as string. Now the questions is how to insert html tag (particularly <title> or jsx component back to the hast ?
After remark2rehype .. plugins are not working
I have tried multiple rehype plugins, but it seems none of them is working. One is https://github.com/rstacruz/rehype-decorate .. try to run the example, it's outputting only <h1>hello world</h1>. Another one is https://github.com/agentofuser/rehype-section .. also does not work…
Using an external parser with rehype-react
Is it possible to use rehype-react without rehype-parser? I would like to use svg-parser (https://github.com/Rich-Harris/svg-parser), which also returns a HAST object. As I am only wanting to parse SVG files, rehype-parser doesn't seem the best fit. Thanks.
Only select single element from html (by id)
Maybe I'm misusing unist-util-select.select here (if so please let me know what's the preferred way), but I'm trying to extract a single element from html by its id. If I do select('#foobar', tree) however, I get Error: Invalid selector: id. What would be the normal progression…
Creating (?) a plugin for adding soft-hyphens (­) according to a dictionary
I just learned about unified and I really like the approach. Regularly, I stumble upon the same problem: Long-words that do not properly break in the web. I tried to use css's hyphens: auto;, but this outsources the problem to the browser which some of them are doing a bad…
Rehype-Formatter throwing error in test suite
Hi, i am not sure if this belongs here but I did not find a place for rehype. rehype-formatter. We are using rehype to format our html which is working fine. But when we are trying to write test cases for our code, rehype is throwing the following error.
Inlining styles with rehype-highlight
I'm trying to use rehype-highlight and, while I did get it to annotate the html with the proper css class names, I still haven't figured out how to: 1. link the stylesheet with the actual class definitions 2. inline the styles in the html …
I wrote a little package to wrap heading content into nested `<section>` tags
Here it is: https://github.com/agentofuser/rehype-section It's my first time working with unified and it was a lot of fun! The package itself is more of an exercise in defining a boilerplate for future packages than anything too significant on its own, but it can come in handy…