diff --git a/spec/index.html b/spec/index.html index 3dabceb6..3e9fbf92 100644 --- a/spec/index.html +++ b/spec/index.html @@ -51,8 +51,8 @@
| Command Line Option | Front-Matter Key | Description |
|---|---|---|
| `title` | Document title, for example "ECMAScript 2016" or "Async Functions". | |
| `status` | Document status. Can be "proposal", "draft", or "standard". Defaults to "proposal". | |
| `stage` | TC39 proposal stage. If present and `status` is "proposal", `version` defaults to "Stage stage Draft". | |
| `version` | Document version, for example "6<sup>th</sup> Edition" (which renders like "6th Edition") or "Draft 1". | |
| `date` | Timestamp of document rendering, used for various pieces of boilerplate. Defaults to the value of the `SOURCE_DATE_EPOCH` environment variable (as a number of second since the POSIX epoch) if it exists, otherwise to the current date and time. Required for documents with "standard" status, should reflect adoption date. | |
| `shortname` | Document shortname, for example "ECMA-262". If present and `status` is "draft", `version` defaults to "Draft shortname". | |
| `title` | Document title, for example “ECMAScript 2016” or “Async Functions”. | |
| `status` | Document status. Can be “proposal”, “draft”, or “standard”. Defaults to “proposal”. | |
| `stage` | TC39 proposal stage. If present and `status` is “proposal”, `version` defaults to “Stage stage Draft”. | |
| `version` | Document version, for example “6<sup>th</sup> Edition” (which renders like “6th Edition”) or “Draft 1”. | |
| `date` | Timestamp of document rendering, used for various pieces of boilerplate. Defaults to the value of the `SOURCE_DATE_EPOCH` environment variable (as a number of second since the POSIX epoch) if it exists, otherwise to the current date and time. Required for documents with “standard” status, should reflect adoption date. | |
| `shortname` | Document shortname, for example “ECMA-262”. If present and `status` is “draft”, `version` defaults to “Draft shortname”. | |
| `description` | Brief description to be used for link previews in social media and the like. | |
| `location` | URL of this document. Used in conjunction with the biblio file to support inbound references from other documents. | |
| `copyright` | Emit copyright and software license information. Boolean, default true. | |
| `contributors` | Contributors to this specification, i.e. those who own the copyright. If your proposal includes text from any Ecma specification, this should include "Ecma International". | |
| `committee` | Ecma Technical Committee number. Required for documents with "standard" status, expects e.g. "39". Appends adoption information to <emu-intro> element. | |
| `contributors` | Contributors to this specification, i.e. those who own the copyright. If your proposal includes text from any Ecma specification, this should include “Ecma International”. | |
| `committee` | Ecma Technical Committee number. Required for documents with “standard” status, expects e.g. “39”. Appends adoption information to <emu-intro> element. | |
| `--no-toc` | `toc` | Emit table of contents. Boolean, default true. |
| `--printable` | `printable` | Make the output suitable for printing. Boolean, default false. |
| `--load-biblio` | `extraBiblios` | Extra biblio.json file(s) to load. This should contain either an object as exported by `--write-biblio` or an array of such objects. |
| `boilerplate` | An object with `address` and/or `copyright` and/or `license` fields containing paths to files containing the corresponding content for populating an element with class "copyright-and-software-license" (or if not found, an appended | |
| `--mark-effects` | `markEffects` | Propagate and render effects like "user code". |
| `boilerplate` | An object with `address` and/or `copyright` and/or `license` fields containing paths to files containing the corresponding content for populating an element with class “copyright-and-software-license” (or if not found, an appended | |
| `--mark-effects` | `markEffects` | Propagate and render effects like “user code”. |
Ecmarkup requires CSS styles and other assets. By default all assets are inlined into the document. You can override this by setting assets to "none" (for example if you want to manually link to external assets) or "external". When using "external" the default directory for assets is `assets` in the same directory as the output file, but you can override this with `--assets-dir`.
+Ecmarkup requires CSS styles and other assets. By default all assets are inlined into the document. You can override this by setting assets to “none” (for example if you want to manually link to external assets) or “external”. When using “external” the default directory for assets is `assets` in the same directory as the output file, but you can override this with `--assets-dir`.
number: Optional: An explicit clause number, overriding the default auto-incrementing number. Can be a nested number, as in `number="2.1"`.
type: Optional: Type of feature described by the clause.
A clause describing an operation or method may have a structured header to document its signature and metadata. Such a structure consists of:
<h1> element containing the name of the operation followed by a parenthesized list of parameters, each appearing on a comma-terminated line of its own and consisting of a name and value constraints separated by a colon and optionally preceded with "optional"<h1> element containing the name of the operation followed by a parenthesized list of parameters, each appearing on a comma-terminated line of its own and consisting of a name and value constraints separated by a colon and optionally preceded with “optional”<dl> element with class "header" and a collection of optional key-value pairs expressed using <dt> and <dd> elements:
+ a <dl> element with class “header” and a collection of optional key-value pairs expressed using <dt> and <dd> elements:
Abstract operations can be marked as having effects that propagate to their invocation sites. Subject to the following rules, calls to such operations are given a class of the effect name prefixed with “e-”. When using `markEffects`, the CSS includes styling for the "user-code" effect via class name `e-user-code` that is off by default but can be togged by pressing u.
+Abstract operations can be marked as having effects that propagate to their invocation sites. Subject to the following rules, calls to such operations are given a class of the effect name prefixed with “e-”. When using `markEffects`, the CSS includes styling for the “user-code” effect via class name `e-user-code` that is off by default but can be togged by pressing u.
Within an algorithm, an `emu-meta` element enclosing an operation invocation can be used to indicate either the origination of effects or the absence of effects using a list of effect names separated by commas with optional whitespace in an effects or suppress-effects attribute (respectively).
@@ -469,7 +469,7 @@ emu-note
Non-normative explanatory text. Comes in two types - regular notes and Editor's notes. Regular notes are intended for the implementers and end users of this specification. Editor's notes are notes to and from the Editors and will generally be removed prior to a specification being finalized and ratified.
Attributes
- type: The type of note, either blank or "editor".
+ type: The type of note, either blank or “editor”.
Example
@@ -617,7 +617,7 @@ Abstract Methods
The first two columns are assumed to be the method signature and the method description respectively.
Attributes
- type: Must be present with the value "abstract methods".
+ type: Must be present with the value “abstract methods”.
of: Must be present; the value is the name of the type for which this table defines the methods.
caption: Optional: If not present, will be generated based on the type name
@@ -871,8 +871,8 @@ Attributes
primary: Optional: Deprecated in favor of type="definition".
type: Optional: Disposition of the grammar. If absent, it is considered to reference productions defined elsewhere.
- - "definition": The grammar is an authoritative source for productions which should be the target of references.
- - "example": Deprecated in favor of the example attribute.
+ - “definition”: The grammar is an authoritative source for productions which should be the target of references.
+ - “example”: Deprecated in favor of the example attribute.
Example
@@ -993,8 +993,8 @@ Attributes
primary: Optional: The production is authoritative and should be the target of references.
type: Optional: Type of production. If absent, the production is considered syntactic.
- - "lexical": The production is part of a lexical grammar, and should render with the LHS and RHS separated by two colons “::”.
- - "regexp": Deprecated because the ECMAScript regular expression grammar is considered to be lexical. Productions with this type render with the LHS and RHS separated by three colons “:::”.
+ - “lexical”: The production is part of a lexical grammar, and should render with the LHS and RHS separated by two colons “::”.
+ - “regexp”: Deprecated because the ECMAScript regular expression grammar is considered to be lexical. Productions with this type render with the LHS and RHS separated by three colons “:::”.
Contains well-known modifiers to a right-hand side of a production. The only well-known modifier at present is the "but not" modifier. See the Identifier example
Contains well-known modifiers to a right-hand side of a production. The only well-known modifier at present is the “but not” modifier. See the Identifier example
Contains well-known annotations to to a right-hand side of a production. The only well-known modifiers at present are "lookahead" and "empty". See the ExpressionStatement example
Contains well-known annotations to to a right-hand side of a production. The only well-known modifiers at present are “lookahead” and “empty”. See the ExpressionStatement example
The `ins` and `del` HTML elements can be used to mark insertions and deletions respectively. When adding or removing block content (such as entire list items, paragraphs, clauses, grammar RHSes, etc.), use a class of "block".
+The `ins` and `del` HTML elements can be used to mark insertions and deletions respectively. When adding or removing block content (such as entire list items, paragraphs, clauses, grammar RHSes, etc.), use a class of “block”.
ECMAScript <del>6</del><ins>2015</ins> <del>will be ratified</del><ins>was ratified</ins> in June, 2015.
diff --git a/src/formatter/ecmarkup.ts b/src/formatter/ecmarkup.ts
index 7622ee37..4c535d05 100644
--- a/src/formatter/ecmarkup.ts
+++ b/src/formatter/ecmarkup.ts
@@ -15,6 +15,7 @@ const RAW_CONTENT_ELEMENTS = new Set([
'script',
'style',
'code',
+ 'emu-val',
]);
// https://html.spec.whatwg.org/multipage/syntax.html#void-elements
@@ -84,7 +85,7 @@ export async function printDocument(src: string): PromiseASCII quotes are not replaced in "code elements",