Skip to content

Commit 2d86634

Browse files
gesamichaelficarra
andcommitted
Stricter identification of technical committee
Co-authored-by: Michael Ficarra <[email protected]>
1 parent d544179 commit 2d86634

File tree

4 files changed

+6
-7
lines changed

4 files changed

+6
-7
lines changed

spec/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ <h1>Options</h1>
7575
<tr><td></td><td>`location`</td><td>URL of this document. Used in conjunction with the biblio file to support inbound references from other documents.</td></tr>
7676
<tr><td></td><td>`copyright`</td><td>Emit copyright and software license information. Boolean, default true.</td></tr>
7777
<tr><td></td><td>`contributors`</td><td>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".</td></tr>
78-
<tr><td></td><td>`committee`</td><td>Technical Committee. Required for documents with "standard" status, expects e.g. "TC39" or "39". Appends adoption information to &lt;emu-intro&gt; element.</td></tr>
78+
<tr><td></td><td>`committee`</td><td>Ecma Technical Committee number. Required for documents with "standard" status, expects e.g. "39". Appends adoption information to &lt;emu-intro&gt; element.</td></tr>
7979
<tr><td>`--no-toc`</td><td>`toc`</td><td>Emit table of contents. Boolean, default true.</td></tr>
8080
<tr><td>`--printable`</td><td>`printable`</td><td>Make the output suitable for printing. Boolean, default false.</td></tr>
8181
<tr><td>`--load-biblio`</td><td>`extraBiblios`</td><td>Extra biblio.json file(s) to load. This should contain either an object as exported by `--write-biblio` or an array of such objects.</td></tr>

src/Spec.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -602,10 +602,12 @@ export default class Spec {
602602
const adoptionInfo = this.doc.createElement('p');
603603

604604
adoptionInfo.classList.add('adoption-info');
605-
adoptionInfo.innerHTML = `This Ecma Standard was developed by Technical Committee ${this.opts.committee.toLowerCase().replace('tc', '')} and was adopted by the General Assembly of ${Intl.DateTimeFormat('en-GB', {month: 'long', year: 'numeric'}).format(this.opts.date)}.`
605+
adoptionInfo.innerHTML = `This Ecma Standard was developed by Technical Committee ${this.opts.committee} and was adopted by the General Assembly of ${Intl.DateTimeFormat('en-GB', { month: 'long', year: 'numeric' }).format(this.opts.date)}.`;
606606
intro!.appendChild(adoptionInfo);
607607
} else {
608-
throw new Error('"standard" status requires a technical committee be defined in the metadata.');
608+
throw new Error(
609+
'"standard" status requires a technical committee be defined in the "committee" field of the metadata.',
610+
);
609611
}
610612
}
611613

src/ecmarkup.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ export interface Options {
4949
boilerplate?: Boilerplate;
5050
log?: (msg: string) => void;
5151
warn?: (err: EcmarkupError) => void;
52-
committee?: string;
52+
committee?: number;
5353
}
5454

5555
export async function build(

test/baselines/generated-reference/assets-inline.html

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3249,8 +3249,6 @@
32493249
background: var(--figure-background);
32503250
width: 500px;
32513251
}
3252-
3253-
.adoption-info { display: none; }
32543252
</style><style>@media print {
32553253
@font-face {
32563254
font-family: "Arial Plus";
@@ -3931,7 +3929,6 @@
39313929
}
39323930
39333931
p.adoption-info {
3934-
display: block;
39353932
float: bottom;
39363933
}
39373934

0 commit comments

Comments
 (0)