Skip to content

Commit d1f6b3b

Browse files
committed
i tripped all over the edge case.
1 parent a004373 commit d1f6b3b

File tree

6 files changed

+38
-17
lines changed

6 files changed

+38
-17
lines changed

PUBLISHING.md

Lines changed: 28 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,42 @@
33
## Required frontmatter
44

55
- In order to produce a PDF, the front matter `title`, `shortname`, and `status` are **mandatory**.
6-
- If using the alternative copyright, `location` is also mandatory.
7-
- If generating a version for submission to the GA, `version` and `date` are mandatory. `date` should reflect the date of the Ecma GA which will ratify the Standard. For example:
86

7+
```yaml
8+
title: Temporal proposal
9+
shortname: Temporal
10+
status: proposal
11+
stage: 3
912
```
10-
title: ECMAScript® 2024 Language Specification
13+
14+
- If using the alternative copyright for a standard publication, `location` is also mandatory. For example:
15+
16+
```yaml
17+
title: ECMAScript® Language Specification
18+
shortname: ECMA-262
19+
status: draft
20+
boilerplate:
21+
copyright: alternative
22+
```
23+
24+
- If generating a version for submission to the GA, `version` and `date` are mandatory. `date` should reflect the date of the Ecma GA which will ratify the Standard.
25+
26+
```yaml
27+
title: ECMAScript® 2025 Language Specification
1128
shortname: ECMA-262
12-
version: 15<sup>th</sup> Edition
13-
date: 2024-06-25
29+
version: 16<sup>th</sup> Edition
30+
date: 2025-06-25
31+
status: standard
32+
boilerplate:
33+
copyright: alternative
34+
location: https://262.ecma-international.org/16.0/
1435
```
1536

1637
To generate markup for use in PDF conversion, make sure to include the options `--assets`, `--assets-dir`, and `--printable`. If you have images and styles to include, make sure to move them into your assets directory before running `ecmarkup`. For example:
1738

1839
```shell
19-
mkdir -p out &&
20-
cp -R images out &&
40+
mkdir -p out && \
41+
cp -R images out && \
2142
ecmarkup --assets external --assets-dir out --printable spec.html out/index.html
2243
```
2344

src/Spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1477,10 +1477,10 @@ ${this.opts.multipage ? `<li><span>Navigate to/from multipage</span><code>m</cod
14771477
versionText += version + ' / ';
14781478
} else if (status === 'proposal' && stage) {
14791479
versionText += 'Stage ' + stage + ' Draft / ';
1480-
} else if (status === 'draft') {
1480+
} else if (status === 'draft' && shortname) {
14811481
if (this.opts.printable) {
14821482
versionText += 'Draft / ';
1483-
} else if (shortname) {
1483+
} else {
14841484
versionText += 'Draft ' + shortname + ' / ';
14851485
omitShortname = true;
14861486
}

test/baselines/generated-reference/boilerplate-address.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
<!doctype html>
2-
<head><meta charset="utf-8"><meta property="og:image" content="https://tc39.es/ecmarkup/ecma-logo.png"><meta property="og:title" content="test title!"><title>test title!</title></head><body><div id="shortcuts-help">
2+
<head><meta charset="utf-8"><title>test title!</title></head><body><div id="shortcuts-help">
33
<ul>
44
<li><span>Toggle shortcuts help</span><code>?</code></li>
55
<li><span>Toggle "can call user code" annotations</span><code>u</code></li>
66

77
<li><span>Jump to search box</span><code>/</code></li>
88
<li><span>Toggle pinning of the current clause</span><code>p</code></li>
99
<li><span>Jump to <i>n</i>th pin</span><code>1-9</code></li>
10-
</ul></div><div id="spec-container"><h1 class="version">April 2, 2018</h1><h1 class="title">test title!</h1>
10+
</ul></div><div id="spec-container"><h1 class="title">test title!</h1>
1111

1212
<emu-annex id="sec-copyright-and-software-license" back-matter="">
1313
<h1>Copyright &amp; Software License</h1>

test/baselines/generated-reference/boilerplate-all.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
<!doctype html>
2-
<head><meta charset="utf-8"><meta property="og:image" content="https://tc39.es/ecmarkup/ecma-logo.png"><meta property="og:title" content="test title!"><title>test title!</title></head><body><div id="shortcuts-help">
2+
<head><meta charset="utf-8"><title>test title!</title></head><body><div id="shortcuts-help">
33
<ul>
44
<li><span>Toggle shortcuts help</span><code>?</code></li>
55
<li><span>Toggle "can call user code" annotations</span><code>u</code></li>
66

77
<li><span>Jump to search box</span><code>/</code></li>
88
<li><span>Toggle pinning of the current clause</span><code>p</code></li>
99
<li><span>Jump to <i>n</i>th pin</span><code>1-9</code></li>
10-
</ul></div><div id="spec-container"><h1 class="version">April 2, 2018</h1><h1 class="title">test title!</h1>
10+
</ul></div><div id="spec-container"><h1 class="title">test title!</h1>
1111

1212
<emu-annex id="sec-copyright-and-software-license" back-matter="">
1313
<h1>Copyright &amp; Software License</h1>

test/baselines/generated-reference/boilerplate-copyright.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
<!doctype html>
2-
<head><meta charset="utf-8"><meta property="og:image" content="https://tc39.es/ecmarkup/ecma-logo.png"><meta property="og:title" content="test title!"><title>test title!</title></head><body><div id="shortcuts-help">
2+
<head><meta charset="utf-8"><title>test title!</title></head><body><div id="shortcuts-help">
33
<ul>
44
<li><span>Toggle shortcuts help</span><code>?</code></li>
55
<li><span>Toggle "can call user code" annotations</span><code>u</code></li>
66

77
<li><span>Jump to search box</span><code>/</code></li>
88
<li><span>Toggle pinning of the current clause</span><code>p</code></li>
99
<li><span>Jump to <i>n</i>th pin</span><code>1-9</code></li>
10-
</ul></div><div id="spec-container"><h1 class="version">April 2, 2018</h1><h1 class="title">test title!</h1>
10+
</ul></div><div id="spec-container"><h1 class="title">test title!</h1>
1111

1212
<emu-annex id="sec-copyright-and-software-license" back-matter="">
1313
<h1>Copyright &amp; Software License</h1>

test/baselines/generated-reference/boilerplate-license.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
<!doctype html>
2-
<head><meta charset="utf-8"><meta property="og:image" content="https://tc39.es/ecmarkup/ecma-logo.png"><meta property="og:title" content="test title!"><title>test title!</title></head><body><div id="shortcuts-help">
2+
<head><meta charset="utf-8"><title>test title!</title></head><body><div id="shortcuts-help">
33
<ul>
44
<li><span>Toggle shortcuts help</span><code>?</code></li>
55
<li><span>Toggle "can call user code" annotations</span><code>u</code></li>
66

77
<li><span>Jump to search box</span><code>/</code></li>
88
<li><span>Toggle pinning of the current clause</span><code>p</code></li>
99
<li><span>Jump to <i>n</i>th pin</span><code>1-9</code></li>
10-
</ul></div><div id="spec-container"><h1 class="version">April 2, 2018</h1><h1 class="title">test title!</h1>
10+
</ul></div><div id="spec-container"><h1 class="title">test title!</h1>
1111

1212
<emu-annex id="sec-copyright-and-software-license" back-matter="">
1313
<h1>Copyright &amp; Software License</h1>

0 commit comments

Comments
 (0)