Replies: 3 comments 5 replies
-
Sorry, I meant to post this is the UnifiedJS discussion board, which is where I was told it was best to post questions like this. If I could delete it and move it I would, let me know if I should repost it there. |
Beta Was this translation helpful? Give feedback.
-
Howdy @johnhooks! 🤠 👋
To be sure I understand
Without that context my best guess is that you want to interpret that JavaScript in a If that's the case, I'd consider using |
Beta Was this translation helpful? Give feedback.
-
@ChristianMurphy after reading the article, I wouldn't just pass the data down, but do it as a fully constructed |
Beta Was this translation helpful? Give feedback.
-
I really like the concept of using metadata in the code fence to specify how to display the content of a code block. There seem to be a lot of different ways to do it. I like the Rehype Pretty Code syntax for it, but the way they parse it is pretty basic and not made available. I have a functional concept that uses a subset of JavaScript syntax, which makes it really easy to use
acorn
with a custom plugin to make it work.They do something like this:
I propose this
So after saying all that, I have this cool parser, but what would be the right way to expose it? Is it possible to make it available to other plugins? I read about the
data
attribute, and I've seen some plugins add to it. But is that correct?This is what I'm considering...
Thanks for any help.
Beta Was this translation helpful? Give feedback.
All reactions