Skip to content

armgit / bygga

Public Imported from GitHub
0

IKEA assembly, step by step: animated, manual-style 3D guides. Scan any paper manual with Together AI.

TypeScript

Size chips: "6 seat" reads "6-seat" like its neighbours

Youssef403c9882bf67
diff --git a/src/components/guide/CoverPanel.tsx b/src/components/guide/CoverPanel.tsx
index c6f4ed0..cb32660 100644
--- a/src/components/guide/CoverPanel.tsx
+++ b/src/components/guide/CoverPanel.tsx
@@ -274,6 +274,7 @@ function tidy(t: string) {
const s = SHORTHAND.reduce((acc, [re, word]) => acc.replace(re, word), t)
.replace(/(^|\s)w (?=\S)/gi, "$1with ")
.replace(/\bdrs\b/g, "doors")
+ .replace(/(\d) seat\b/g, "$1-seat")
// a size never breaks across lines
.replace(/ × /g, "\u00a0×\u00a0")
.replace(/(\d) cm\b/g, "$1\u00a0cm");