Skip to content

Commit 63304ef

Browse files
committed
fix(site): compressHTML whitespace mode; contributing example link to a real map
compressHTML: true restores pre-7 whitespace collapse (space preserved between text and inline elements) — the systemic fix for the glue bug hand-patched across pages; the source-level vitest guard stays as a second layer. The old Map_Format.adoc reference no longer exists — point step 03 at a fully-worked map in the corpus instead (resolves once interscript/maps#180 lands the .isc migration).
1 parent 1480b05 commit 63304ef

2 files changed

Lines changed: 58 additions & 64 deletions

File tree

astro.config.mjs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ import node from "@astrojs/node"
1010
// @astrojs/node. Deploy target: any Node-capable host.
1111
export default defineConfig({
1212
site: "https://www.interscript.org",
13+
// Collapse whitespace to a single space (pre-7 behavior) instead of
14+
// JSX-style removal, which glues text to adjacent inline elements.
15+
compressHTML: true,
1316
output: "static",
1417
adapter: node({ mode: "standalone" }),
1518
integrations: [vue()],

src/pages/contributing.astro

Lines changed: 55 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,9 @@ import Base from "../layouts/Base.astro"
1111
<p class="eyebrow eyebrow-accent">Contributing</p>
1212
<h1>Add a transliteration system.</h1>
1313
<p class="hero-deck">
14-
Interscript grows when contributors encode romanization systems
15-
from authority documents into the open-source corpus. This page
16-
walks through the process — it's more straightforward than it
17-
looks.
14+
Interscript grows when contributors encode romanization systems from authority documents
15+
into the open-source corpus. This page walks through the process — it's more straightforward
16+
than it looks.
1817
</p>
1918
</div>
2019
</section>
@@ -26,10 +25,11 @@ import Base from "../layouts/Base.astro"
2625
<h2>Find a system to add</h2>
2726
</header>
2827
<p>
29-
Browse the <a href="/maps">catalogue</a> to see what's already
30-
covered. Then check the <a href="https://github.com/interscript/maps/issues" rel="noreferrer">issue tracker</a> for requested systems. If the system you want isn't listed
31-
anywhere, open a new issue describing the authority document so
32-
maintainers can confirm scope.
28+
Browse the <a href="/maps">catalogue</a> to see what's already covered. Then check the <a
29+
href="https://github.com/interscript/maps/issues"
30+
rel="noreferrer">issue tracker</a
31+
> for requested systems. If the system you want isn't listed anywhere, open a new issue describing
32+
the authority document so maintainers can confirm scope.
3333
</p>
3434
</article>
3535

@@ -39,63 +39,59 @@ import Base from "../layouts/Base.astro"
3939
<h2>Read the authority document</h2>
4040
</header>
4141
<p>
42-
Most authority romanization tables are published as PDFs.
43-
Read carefully — the rules include edge cases (word-initial vs
44-
word-medial, before/after context, special characters). Note
45-
every rule with its source page number; you'll cite it in the
46-
map metadata.
42+
Most authority romanization tables are published as PDFs. Read carefully — the rules include
43+
edge cases (word-initial vs word-medial, before/after context, special characters). Note
44+
every rule with its source page number; you'll cite it in the map metadata.
4745
</p>
4846
<p>
49-
If the authority document isn't freely available, look for
50-
secondary sources (Wikipedia, library science journals) that
51-
describe the rules. Cite the secondary source in those cases.
47+
If the authority document isn't freely available, look for secondary sources (Wikipedia,
48+
library science journals) that describe the rules. Cite the secondary source in those cases.
5249
</p>
5350
</article>
5451

5552
<article class="step">
5653
<header>
5754
<span class="step-num tnum">03</span>
58-
<h2>Write the map in the Ruby DSL</h2>
55+
<h2>Write the map in ISC</h2>
5956
</header>
6057
<p>
61-
Maps live in <a href="https://github.com/interscript/maps" rel="noreferrer">github.com/interscript/maps</a>,
62-
named <code>{"{authority}-{lang}-{source_script}-{dest_script}-{year}.imp"}</code> (e.g. <code>bgnpcgn-ukr-Cyrl-Latn-2019.imp</code>).
58+
Maps live in <a href="https://github.com/interscript/maps" rel="noreferrer"
59+
>github.com/interscript/maps</a
60+
>, named <code>{"{authority}-{lang}-{source_script}-{dest_script}-{year}.isc"}</code> (e.g. <code
61+
>bgnpcgn-ukr-Cyrl-Latn-2019.isc</code
62+
>).
6363
</p>
64-
<pre><code set:html={`# bgnpcgn-ukr-Cyrl-Latn-2019.imp
64+
<pre><code set:html={`# bgnpcgn-ukr-Cyrl-Latn-2019.isc
65+
system "BGN-PCGN:ukr-Cyrl:Latn:2019" {
66+
6567
metadata {
66-
authority_id: bgnpcgn
67-
id: 2019
68-
language: iso-639-2:ukr
69-
source_script: Cyrl
70-
destination_script: Latn
71-
name: Romanization of Ukrainian (2019)
72-
url: https://github.com/interscript/maps/blob/main/docs/bgnpcgn-ukr-2019.pdf
68+
authority_id bgnpcgn
69+
id 2019
70+
language iso-639-2:ukr
71+
source_script Cyrl
72+
destination_script Latn
73+
name Romanization of Ukrainian (2019 Agreement)
74+
url https://assets.publishing.service.gov.uk/...
7375
}
7476
75-
aliases {
76-
# custom aliases if needed
77+
tests {
78+
"Алушта" -> "Alushta"
79+
"Борщагівка" -> "Borshchahivka"
7780
}
7881
79-
stage {
82+
stage main {
83+
run map.cyrllatn.stage.main
8084
parallel {
81-
sub "а", "a"
82-
sub "б", "b"
83-
sub "в", "v"
84-
# … all single-char rules
85-
sub "щ", "shch"
86-
sub "ь", "ʹ"
87-
sub "'", "'" # apostrophe stays
85+
sub "'" ""
8886
}
89-
90-
# Title-case names at word boundaries
91-
sub any("a".."z"), upcase, before: boundary
9287
}
93-
94-
test "Антон", "Anton"
95-
test "Київ", "Kyiv"`} /></pre>
88+
}`} /></pre>
9689
<p>
97-
The DSL has more options (capture groups, before/after
98-
constraints, run rules that compose stages) — see the <a href="https://github.com/interscript/interscript-ruby/blob/main/docs/Map_Format.adoc" rel="noreferrer">Map Format guide</a> for the full reference.
90+
The format has more options (capture groups, before/after constraints, run rules that
91+
compose stages) — the corpus itself is the reference; see <a
92+
href="https://github.com/interscript/maps/blob/main/maps/bgnpcgn-ukr-Cyrl-Latn-2019.isc"
93+
rel="noreferrer">bgnpcgn-ukr-Cyrl-Latn-2019.isc</a
94+
> for a fully-worked map.
9995
</p>
10096
</article>
10197

@@ -105,16 +101,13 @@ test "Київ", "Kyiv"`} /></pre>
105101
<h2>Add test vectors</h2>
106102
</header>
107103
<p>
108-
Every map ships with <code>test</code> directives — input →
109-
expected output pairs pulled from the authority document or
110-
real-world examples. These run against the Ruby interpreter
111-
and, via the JSON IR, against the TypeScript runtime. Failures
112-
block merge.
104+
Every map ships with <code>test</code> directives — input → expected output pairs pulled from
105+
the authority document or real-world examples. These run against every engine — the Ruby interpreter
106+
and the TypeScript ISC runtime. Failures block merge.
113107
</p>
114108
<p>
115-
Aim for at least 10 test vectors covering common cases,
116-
diacritics, edge cases, and (where applicable) word-boundary
117-
behavior. Cite source pages in code comments.
109+
Aim for at least 10 test vectors covering common cases, diacritics, edge cases, and (where
110+
applicable) word-boundary behavior. Cite source pages in code comments.
118111
</p>
119112
</article>
120113

@@ -124,18 +117,15 @@ test "Київ", "Kyiv"`} /></pre>
124117
<h2>Open a pull request</h2>
125118
</header>
126119
<p>
127-
Fork <code>interscript/maps</code>, push your branch, open a PR.
128-
The CI pipeline runs the Ruby test suite, regenerates the JSON
129-
IR, and re-checks the parity suite. Maintainers review the map
130-
against the source document; if rules are missing or wrong,
131-
they'll point out specific page numbers.
132-
</p>
133-
<p>
134-
Once merged, the new system is automatically:
120+
Fork <code>interscript/maps</code>, push your branch, open a PR. The CI pipeline runs the
121+
test suite against every engine and re-checks the parity suite. Maintainers review the map
122+
against the source document; if rules are missing or wrong, they'll point out specific page
123+
numbers.
135124
</p>
125+
<p>Once merged, the new system is automatically:</p>
136126
<ul>
137127
<li>Available in the Ruby gem (next release)</li>
138-
<li>Available in <code>interscript-ts</code> via the JSON IR</li>
128+
<li>Available in <code>interscript-ts</code> via the ISC runtime</li>
139129
<li>Live on <a href="/">interscript.org</a> (next site build)</li>
140130
<li>Available through the <a href="/api-docs">REST API</a></li>
141131
</ul>
@@ -144,8 +134,9 @@ test "Київ", "Kyiv"`} /></pre>
144134
<section class="contrib-cta">
145135
<h2>Need help?</h2>
146136
<p>
147-
Open a <a href="https://github.com/interscript/maps/issues" rel="noreferrer">GitHub issue</a> with the authority document and what you've tried. The community
148-
is friendly and the maintainers are responsive.
137+
Open a <a href="https://github.com/interscript/maps/issues" rel="noreferrer">GitHub issue</a
138+
> with the authority document and what you've tried. The community is friendly and the maintainers
139+
are responsive.
149140
</p>
150141
</section>
151142
</section>

0 commit comments

Comments
 (0)