Skip to content

[Markdown] [Web/API] Remove hidden elements that don't contain live sample code blocks #7902

@wbamberg

Description

@wbamberg

Part of #7898.

In preparing Web/API docs for Markdown conversion we'd like to remove occurrences of <div class="hidden">. There are two main usages of this pattern:

  1. to include comments for editors, like the comments attached to interactive examples
  2. to hide code blocks that the author wants to participate in live samples, but doesn't want the reader to see

This issue to about removing instances of the first category. The fix in this case is often just to delete the content, although there might be some exceptions.

For an example of this pattern:

<h2 id="Browser_compatibility">Browser compatibility</h2>
<div class="hidden">The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out <a href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> and send us a pull request.</div>

Sometimes this happens when an author has set hidden directly on a <pre> block that's part of a live sample. In this case we should keep the hidden class.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions