Support for WEML (White Estate Markup Language) — an HTML5-compatible format used for importing and exporting publications — in Visual Studio Code.
Features
For .weml files:
- Syntax highlighting based on an extended HTML grammar.
- Autocomplete for tags, attributes and attribute values, respecting nesting rules.
- Hover tooltips describing tags, attributes and values.
- Structure diagnostics: unknown tags and attributes, required attributes,
allowed enum values, child count and order,
<a href>/idlink checks, duplicate<div id>, required<meta>tags in<head>. - Document outline by
<w-heading>headings and top-level<div>blocks. - Formatting into a canonical, normalized WEML form via Format Document and format-on-save.
- Format cycle (
Alt+Shift+F): toggles the whole document between standard HTML formatting (readable, indented) and the canonical WEML form on each press, so you can switch back and forth while editing.
Usage
Open any file with the .weml extension — the features activate
automatically.
Formatting
- Format Document (or format-on-save) rewrites the document into the canonical, normalized WEML form. Canonical formatting is skipped when tag structure is invalid, so malformed content is never replaced by a partial or empty document.
Alt+Shift+Fruns WEML: Cycle Format (HTML / Canonical) — press it once to expand the document into indented, human-readable HTML, and again to collapse it back into the canonical WEML form. Each press alternates between the two. HTML/pretty formatting remains available while an invalid structure is being repaired.
License
MIT