Skip to content

What content models are allowed? #21

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

Closed
tolmasky opened this issue Jul 25, 2018 · 3 comments
Closed

What content models are allowed? #21

tolmasky opened this issue Jul 25, 2018 · 3 comments
Labels
📚 area/docs This affects documentation 💪 phase/solved Post is done 🦋 type/enhancement This is great to have

Comments

@tolmasky
Copy link

Is there anywhere that defines what children are allowed in what nodes?

@wooorm
Copy link
Member

wooorm commented Jul 25, 2018

Nope, but I think that there should be!
Why are you pondering this question?

@tolmasky
Copy link
Author

I'm doing some post-processing for a program that uses .md for a file format, and I just don't really feel like I have a handle as to whether I'm actually handling all the possible combinations. Do I worry about arbitrary markup in tables? Is this something that isn't necessarily possible the written markdown form but still allowed in the syntax nodes? etc.

@wooorm
Copy link
Member

wooorm commented Aug 5, 2018

Hmm, interesting. What is and isn’t allowed depends on the node. I think it would make sense to document this. HTML does it as well.
We made a little project mdast-util-phrasing that documents what’s allowed to be in paragraphs (and table cells, for that matter).
I think it’s a good addition, would you like to work on it?

wooorm added a commit that referenced this issue Aug 28, 2018
* Update to the new style of unist
  <syntax-tree/unist@8055bf4>
* Rename `Text` > `Literal`, `TextNode` > `Text` (syntax-tree/unist#17)
* Reword definitions
* Add introduction, references, links to terms
* Add common mixins for shared fields
* Move enumerations to their own section
* Add description of content models (GH-21)
* Remove marking of YAML as non-standard

Related to syntax-tree/unist#18
Related to syntax-tree/unist#17
Closes GH-21.
wooorm added a commit that referenced this issue Aug 28, 2018
* Update to the new style of unist
  <syntax-tree/unist@8055bf4>
* Rename `Text` > `Literal`, `TextNode` > `Text` (syntax-tree/unist#17)
* Reword definitions
* Add introduction, references, links to terms
* Add common mixins for shared fields
* Move enumerations to their own section
* Add description of content models (GH-21)
* Remove marking of YAML as non-standard
* Make `list.ordered` optional (default: `false`)
* Make `list.loose` optional (default: `false`)
* Make `listItem.loose` optional (default: `false`)
* Make `table.align` optional
* Add references to CSS Text for alignTypes

Related to syntax-tree/unist#18
Related to syntax-tree/unist#17
Closes GH-21.
wooorm added a commit that referenced this issue Aug 31, 2018
* Update to the new style of unist
  <syntax-tree/unist@8055bf4>
* Rename `Text` > `Literal`, `TextNode` > `Text` (syntax-tree/unist#17)
* Reword definitions
* Add introduction, references, links to terms
* Add common mixins for shared fields
* Move enumerations to their own section
* Add description of content models (GH-21)
* Remove marking of YAML as non-standard
* Make `list.ordered` optional (default: `false`)
* Make `list.loose` optional (default: `false`)
* Remove `listItem.loose` (use `list.loose instead)
* Make `table.align` optional
* Add references to CSS Text for alignTypes

Related to syntax-tree/unist#18
Related to syntax-tree/unist#17
Closes GH-21.

Reviewed-by: Christian Murphy <Christian.Murphy.42@gmail.com>
Reviewed-by: Ika <ikatyang@gmail.com>
@wooorm wooorm closed this as completed in f49890b Aug 31, 2018
@wooorm wooorm added ⛵️ status/released 📚 area/docs This affects documentation 🦋 type/enhancement This is great to have labels Aug 12, 2019
@wooorm wooorm changed the title Allowed child nodes? What content models are allowed? Aug 12, 2019
@wooorm wooorm added the 💪 phase/solved Post is done label Apr 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📚 area/docs This affects documentation 💪 phase/solved Post is done 🦋 type/enhancement This is great to have
Development

Successfully merging a pull request may close this issue.

2 participants