-
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
Create standard spec #53
Labels
documentation
Improvements or additions to documentation
Comments
Atinux
added
the
documentation
Improvements or additions to documentation
label
Oct 25, 2022
— with
Volta.net
Just linking ideas about unwrapping of ( |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Markdown Components
1. Inline Components
Inline components can be defined in everywhere inside the content. The inline component's syntax:
Note that inline component should come after or before some contents. Otherwise, they will be treated as Lead Block Components.
If you want to use an inline component followed by specific characters like
-
,_
, or:
, you can use a dummy props specifier after it.2. Block Components
Block components contain further blocks. The proposed syntax for block components is:
2.1. Nesting
Analogous to fenced code blocks, an arbitrary number of colons greater or equal to two could be used as long as the closing line is longer than the opening line. That way, you can even nest blocks by using successively more colons for each containing block.
Nested blocks can also become distinguishable using indention.
2.2. Sections (Slots)
Block components can separate their children into different sections. Look at these sections and Vue's slots that can be rendered separately in different palaces.
3. Leaf Block Components
The syntax for leaf block components:
To be recognized as a block component, leaf block should appear in the begging of the like without any siblings. Otherwise, they will be treated and inline components.
Note that leaf block components can't have more than one colon in their definitions. Blocks with more colons requires an ending line.
4. Span
Span syntax can be used to pass attributes to part of content.
5. Attributes
5.1. Links
5.2. Images
5.3 Strong
5.4. Italic
5.5. Inline Code
5.6. Inline/Block Component
5.7. Block Components reach attributes
Block components accept special form of attributes, similar to markdown front-matter syntax.
6. [TBD] Formatting & Spacing
With defining a set of rules, we can format the content in a consistent way. MDC could have it's own linter and prettier to format the content in a consistent way.
{}
syntax, otherwise they should define---/n.../n---
sectionThe text was updated successfully, but these errors were encountered: