-
Notifications
You must be signed in to change notification settings - Fork 2
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
Labels in container block directives #28
Comments
Could you give an example of using We use |
We have code like this in our educational platform:
The Nuxt syntax highlighter works great... except when you add in the Our examples are similar to the spec below: |
What do you think @farnabaz ? |
I think supporting inline content for block components is a bit confusing, it is block so it should expect children inside it's scope. Also for leaf usage we implemented a self-closing(leaf) block in MDC here |
This spec document has been around for 8 years, and was implemented years ago by Remark. It supports 3 kinds of directives:
1. Inline Directive Syntax
2. Leaf Block Directives
3. Container Block Directives
I'm not too concerned if Nuxt MDC implementation supports both 1 & 2 above, since I am only using it on new projects. However, it would be great if the Nuxt VSCode plugin syntax highlighter could support all 3 syntaxes, so that the plugin would work correctly for projects using the standard Remark MDC implementation. https://talk.commonmark.org/t/generic-directives-plugins-syntax/444 While I agree that it is potentially redundant and confusing to allow the label in blocks, I have never-the-less found it useful. Here is an example. While the first syntax is less explicit, it gives an example of the utility of supporting both inline-content and block-content with the same directive.
|
So @farnabaz & @atinux would you suggest that I fork to add support for this feature of the common mark spec?
I'm taking it you don't want to support this syntax highlighting since Nuxt3 MCD doesn't support this part of the spec. Note that I'm using the remark-directives plugin, which fully supports the spec: |
You can fork yes @mrwwalmsley |
I'm a Nuxt user for my personal projects, but React for work.
For the past couple of years we have used a similar markdown directive syntax to Nuxt MDC.
After I started using Nuxt MDC in my personal projects, I then tried this plugin with my React work projects. It worked great except for ONE thing. We use labels in many of our container block directives.
The Nuxt MDC syntax highlighter doesn't work with container directives as per this spec discussion:
https://talk.commonmark.org/t/generic-directives-plugins-syntax/444
Is that easy to implement?
The text was updated successfully, but these errors were encountered: