This project is a pre-processor for the source documents the CSSWG produces their specs from. We write our specs in HTML, but rely on a preprocessor for a lot of niceties, like automatically generating a bibliography and table of contents, or automatically linking terms to their definitions. Specs also come with a lot of boilerplate repeated on every document, which we omit from our source document.
A short overview of my preprocessor's features:
- automatic linking of terms to their definitions based on text, so you can simple write
Use <a>some term</a> to...
and have it automatically link to the<dfn>some term</dfn>
elsewhere in the document, or in another spec entirely! - automatic id generation for headings and definitions, based on their text.
- textual shortcuts for autolinks: [[FOO]] for bibliography entries, <<foo>> for grammar productions, 'foo' for property names, and ''foo'' for values.
- boilerplate generation, both wholesale and piecemeal.
- markdown-style paragraphs.
- a compact syntax for writing property-definition tables.
- automatic whitespace-prefix stripping from
<pre>
contents, so the contents can be indented properly in your HTML.
Examples of all of the functionality described here can be found by looking at the source of the CSS Variables source document
- Quick Start Guide - gets you from an empty file to a full spec in no time.
- Metadata - describes the format of the required metadata block in your spec.
- Definitions, Autolinks, and Bibliography - describes how to create definitions, autolinks, and bibliography entries.
- Markup - describes several of the markup niceties and shortcuts over plain HTML that the processor recognizes.
- Boilerplate - describes the use and generation of a spec's boilerplate sections. You probably don't need to read this.