-
Notifications
You must be signed in to change notification settings - Fork 7
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
Add support for specifying metadata options in MDX comments #29
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi! Thanks for contributing! Feels related to #26 (a bit annoying that markdown variants haven't settled on a single metadata/comment notation)
As long as it can't accidentally break regular .md
specifications I'd be happy to add it. Might want to refactor it slightly to make the parser-specific metadata injection more configurable (or dependent on the .mdx context in this case)
An alternative to having the |
Do you have a preference? I think having it pick up this style from the fact it's parsing an Since I think the context would be just a bit friendlier I'll start on that version, but should be easy-ish to change. |
The argument for an arg rather than context is that it's more Mintlify-specific than |
fb578c7
to
127a329
Compare
127a329
to
63ceb4c
Compare
@freider I've addressed your comments, please have a look at the updated code when you have a moment. Let me know if there are any further adjustments or improvements you'd like me to make. Thanks again for your guidance! |
Summary
This PR adds support for specifying test metadata in
.mdx
files using MDX-style comments ({/* pmd-metadata: */}
) placed above code blocks. This should support all existing options and allow for easily adding more without having to alter the MDX parsing logic.Example:
Issue: #28