Skip to content
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

h2m converter fails to convert some <dl> elements #4307

Closed
wbamberg opened this issue Jul 26, 2021 · 1 comment · Fixed by mdn/markdown#50
Closed

h2m converter fails to convert some <dl> elements #4307

wbamberg opened this issue Jul 26, 2021 · 1 comment · Fixed by mdn/markdown#50
Labels
🧑‍🤝‍🧑 community contributions by our wonderful community 🐌 idle Issues and PRs without recent activity. Flagged for maintainer follow-up. markdown markdown related issues and pull requests

Comments

@wbamberg
Copy link
Collaborator

I'm not exactly sure of the problem, but the h2m converter can't convert certain <dl> elements. In particular this seems to happen when a <dd> immediately contains another list element or pre block.

For example, the following will not be converted:

<dl>
 <dt>an item</dt>
 <dd>
  <ul>
    <li>with a list</li>
  </ul>
 </dd>
</dl>
<dl>
 <dt>an item</dt>
 <dd>
  <pre>
    a pre block
  </pre>
 </dd>
</dl>

The following will be converted:

<dl>
 <dt>an item</dt>
 <dd>A definition.
  <ul>
    <li>with a list</li>
  </ul>
 </dd>
</dl>
<dl>
 <dt>an item</dt>
 <dd>A definition.
  <pre>
    a pre block
  </pre>
 </dd>
</dl>

These are not very common, but they don't seem invalid to me. Real-world examples:

https://developer.mozilla.org/en-US/docs/Web/CSS/@page/size
https://developer.mozilla.org/en-US/docs/Web/CSS/basic-shape
https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Fonts
https://developer.mozilla.org/en-US/docs/Web/CSS/url()
https://developer.mozilla.org/en-US/docs/Web/CSS/visibility

@wbamberg
Copy link
Collaborator Author

But also! Please see mdn/content#7309 in which we might decide we don't care about supporting <dd> elements that start with not-text.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🧑‍🤝‍🧑 community contributions by our wonderful community 🐌 idle Issues and PRs without recent activity. Flagged for maintainer follow-up. markdown markdown related issues and pull requests
Projects
Development

Successfully merging a pull request may close this issue.

2 participants