-
Notifications
You must be signed in to change notification settings - Fork 1
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 expand
nodes
#25
Comments
pmeinhardt
added a commit
to pmeinhardt/mdast-util-from-adf
that referenced
this issue
Sep 9, 2022
Update: I've looked into converting
|
pmeinhardt
added a commit
to pmeinhardt/mdast-util-from-adf
that referenced
this issue
Oct 11, 2022
For now, ADF `expand` and `nestedExpand` nodes will be skipped, meaning the nodes themselves do not create a counterpart in the resulting MDAST tree. Their child nodes however will be processed and attached to the output tree. An alternative to skipping "expand" nodes could be to represent them as a sequence of MDAST nodes: 1. HTML node: `<details>` 2. HTML node: `<summary>` + expand node title + `</summary>` 3. MDAST nodes for the "expand" node content (the current output) 4. HTML node: `</details>` This produces adequate output when converting the ADF to Markdown and HTML. However, it also comes with its own set of challenges and arguably makes the MDAST tree representation look rather odd, with HTML nodes containing invalid HTML content. The opening and closing `<details>` tags are not valid on their own – though the MDAST documentation explicitly states that HTML nodes do not need to contain "valid or complete HTML" (https://github.com/syntax-tree/mdast#html). For the moment, we go with the "simple" path of ignoring expand nodes. bitcrowd#25
pmeinhardt
added a commit
to pmeinhardt/mdast-util-from-adf
that referenced
this issue
Oct 11, 2022
For now, ADF `expand` and `nestedExpand` nodes will be skipped, meaning the nodes themselves do not create a counterpart in the resulting MDAST tree. Their child nodes however will be processed and attached to the output tree. An alternative to skipping "expand" nodes could be to represent them as a sequence of MDAST nodes: 1. HTML node: `<details>` 2. HTML node: `<summary>` + expand node title + `</summary>` 3. MDAST nodes for the "expand" node content (the current output) 4. HTML node: `</details>` This produces adequate output when converting the ADF to Markdown and HTML. However, it also comes with its own set of challenges and arguably makes the MDAST tree representation look rather odd, with HTML nodes containing invalid HTML content. The opening and closing `<details>` tags are not valid on their own – though the MDAST documentation explicitly states that HTML nodes do not need to contain "valid or complete HTML" (https://github.com/syntax-tree/mdast#html). For the moment, we go with the "simple" path of ignoring expand nodes. bitcrowd#25
pmeinhardt
added a commit
to pmeinhardt/mdast-util-from-adf
that referenced
this issue
Oct 11, 2022
For now, ADF `expand` and `nestedExpand` nodes will be skipped, meaning the nodes themselves do not create a counterpart in the resulting MDAST tree. Their child nodes however will be processed and attached to the output tree. An alternative to skipping "expand" nodes could be to represent them as a sequence of MDAST nodes: 1. HTML node: `<details>` 2. HTML node: `<summary>` + expand node title + `</summary>` 3. MDAST nodes for the "expand" node content (the current output) 4. HTML node: `</details>` This produces adequate output when converting the ADF to Markdown and HTML. However, it also comes with its own set of challenges and arguably makes the MDAST tree representation look rather odd, with HTML nodes containing invalid HTML content. The opening and closing `<details>` tags are not valid on their own – though the MDAST documentation explicitly states that HTML nodes do not need to contain "valid or complete HTML" (https://github.com/syntax-tree/mdast#html). For the moment, we go with the "simple" path of ignoring expand nodes. bitcrowd#25
pmeinhardt
added a commit
to pmeinhardt/mdast-util-from-adf
that referenced
this issue
Oct 11, 2022
For now, ADF `expand` and `nestedExpand` nodes will be skipped, meaning the nodes themselves do not create a counterpart in the resulting MDAST tree. Their child nodes however will be processed and attached to the output tree. An alternative to skipping "expand" nodes could be to represent them as a sequence of MDAST nodes: 1. HTML node: `<details>` 2. HTML node: `<summary>` + expand node title + `</summary>` 3. MDAST nodes for the "expand" node content (the current output) 4. HTML node: `</details>` This produces adequate output when converting the ADF to Markdown and HTML. However, it also comes with its own set of challenges and arguably makes the MDAST tree representation look rather odd, with HTML nodes containing invalid HTML content. The opening and closing `<details>` tags are not valid on their own – though the MDAST documentation explicitly states that HTML nodes do not need to contain "valid or complete HTML" (https://github.com/syntax-tree/mdast#html). For the moment, we go with the "simple" path of ignoring expand nodes. bitcrowd#25
klappradla
pushed a commit
that referenced
this issue
Oct 13, 2022
For now, ADF `expand` and `nestedExpand` nodes will be skipped, meaning the nodes themselves do not create a counterpart in the resulting MDAST tree. Their child nodes however will be processed and attached to the output tree. An alternative to skipping "expand" nodes could be to represent them as a sequence of MDAST nodes: 1. HTML node: `<details>` 2. HTML node: `<summary>` + expand node title + `</summary>` 3. MDAST nodes for the "expand" node content (the current output) 4. HTML node: `</details>` This produces adequate output when converting the ADF to Markdown and HTML. However, it also comes with its own set of challenges and arguably makes the MDAST tree representation look rather odd, with HTML nodes containing invalid HTML content. The opening and closing `<details>` tags are not valid on their own – though the MDAST documentation explicitly states that HTML nodes do not need to contain "valid or complete HTML" (https://github.com/syntax-tree/mdast#html). For the moment, we go with the "simple" path of ignoring expand nodes. #25
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
See this issue on Tickety Tick for additional context and examples.
The text was updated successfully, but these errors were encountered: