Files
dickloads/data/units.json
Falkan d332cc135e fix: description placeholder sentinel leaking to output
Two bugs:
1. Sentinel used double-underscore delimiters (__DESC:id__) — fragile regex
   [^_]+ would break on IDs containing underscores, and Pass-1 output
   containing sentinels would leak through Pass 2 unstripped.
2. After Pass 2 substitution, sentinels inside substituted text (from
   Pass-1 output of the referenced id) were never cleaned up.

Fix: switch to null-byte delimiters (\x00DESC:id\x00) which cannot appear
in user text, and add a second .replace(SENTINEL_RE, '') pass to strip any
sentinels that survive after substitution (self-refs, nested cycles).
2026-03-18 19:51:01 -04:00

106 lines
2.3 KiB
JSON

{
"units": [
{
"id": "pound",
"label": "pound",
"labelPlural": "pounds",
"symbol": "lb",
"group": "dickloads",
"toBase": 0.038,
"description": "{dickload:description}"
},
{
"id": "dickload",
"label": "dickload",
"labelPlural": "dickloads",
"symbol": "dl",
"group": "dickloads",
"toBase": 1,
"description": "See {pound:description}"
},
{
"id": "barrel",
"label": "barrel",
"labelPlural": "barrels",
"symbol": "bbl",
"group": "dickloads",
"toBase": 19
},
{
"id": "hogshead",
"label": "hogshead",
"labelPlural": "hogsheads",
"symbol": "hhd",
"group": "dickloads",
"toBase": 38
},
{
"id": "short-ton",
"label": "short ton",
"labelPlural": "short tons",
"symbol": "t",
"group": "dickloads",
"toBase": 76
},
{
"id": "fuckton",
"label": "fuck ton",
"labelPlural": "fuck tons",
"symbol": "fcktn",
"group": "dickloads",
"toBase": 152
},
{
"id": "long-ton",
"label": "long ton",
"labelPlural": "long tons",
"symbol": "long tn",
"group": "dickloads",
"toBase": 85.1199999999,
"hidden": false
},
{
"id": "metric-fuckton",
"label": "metric fuckton",
"labelPlural": "metric fucktons",
"symbol": "mfcktn",
"group": "dickloads",
"toBase": 170.2399999998,
"description": "Trivia: although the name is \"metric fuckton,\" it is actually equal to two {long-ton:plural}!",
"hidden": false
},
{
"id": "assload",
"label": "assload",
"labelPlural": "assloads",
"symbol": "assl",
"group": "dickloads",
"toBase": 2
},
{
"id": "shitload",
"label": "shitload",
"labelPlural": "shitloads",
"symbol": "shtld",
"group": "dickloads",
"toBase": 12.6666666667
},
{
"id": "shit-ton",
"label": "shit ton",
"labelPlural": "shit tons",
"symbol": "shttn",
"group": "dickloads",
"toBase": 38
}
],
"groups": [
{
"id": "dickloads",
"label": "Dickloads",
"baseUnitId": "",
"toUniversal": 1
}
]
}