remove - speced/respec GitHub Wiki

.remove

Marks an element to be removed from the document during processing. This is how the ReSpec <script> elements and config blocks are handled — they are stripped after processing completes.

Usage

<div class="remove">
  <p>This content is for authoring convenience only and won't appear in the output.</p>
</div>
<script src="respec-w3c.js" class="remove" async></script>
<script class="remove">
  var respecConfig = { ... };
</script>

Notes

  • The .remove class strips the element entirely from both the live preview and the saved HTML export
  • For content that should only be stripped from the saved/exported HTML (but remain visible during live authoring), use .removeOnSave instead
  • All <script class="remove"> elements in a ReSpec document use this pattern
⚠️ **GitHub.com Fallback** ⚠️