jaywcjlove / rehype-attr Goto Github PK
View Code? Open in Web Editor NEWNew syntax to add attributes to Markdown.
Home Page: https://jaywcjlove.github.io/rehype-attr
License: MIT License
New syntax to add attributes to Markdown.
Home Page: https://jaywcjlove.github.io/rehype-attr
License: MIT License
This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.
These updates are pending. To force PRs open, click the checkbox below.
These updates have all been created already. Click a checkbox below to force a retry/rebase of any.
.github/workflows/ci.yml
actions/checkout v4
actions/setup-node v4
peaceiris/actions-gh-pages v3
ncipollo/release-action v1
.github/workflows/pull_request.yml
actions/checkout v4
actions/setup-node v4
package.json
unified ~11.0.0
unist-util-visit ~5.0.0
rehype ~13.0.0
rehype-raw ~7.0.0
rehype-stringify ~10.0.0
remark-gfm ~4.0.0
remark-parse ~11.0.0
remark-rehype ~11.0.0
tsbb ^4.2.3
node >=16
First of all I'm sorry to open an issue in your GitHub repository! I really appreciate the tool you created and thank you for the work.
I was wondering if there is a way to parse markdown with this tool and give the attribute className
instead of the regular class
when using a comment like:
Some paragraph of my markdown file...
<!--rehype:className=regularText-->
The problem with this is that if I render things as .use(rehypeAttr, { properties: 'attr' })
, this gives a translation that adds class
to the resulting <p>
instead of className
. I'm asking this in the hope that something already exists, but if not I'd be happy to collaborate on some code for the implementation.
I was using ChatGPT to help me fix this, and it suggested a syntax similar to this:
.use(rehypeAttr, {
p: { className: 'text-gray-700 my-10' },
h1: { className: 'text-3xl font-bold' },
})
Is this valid? Because when I try to use it nothing happens.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.