@pubid/pubid 0.1.15 → 0.1.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/artifact/corpus.json.gz
CHANGED
|
Binary file
|
|
@@ -1234,9 +1234,16 @@ class IeeeBuilder {
|
|
|
1234
1234
|
}
|
|
1235
1235
|
// A stage word with a glued year tail ("/D=CD2-201802") rides the
|
|
1236
1236
|
// D= designator with the IEEE lead (the reference's builder, the
|
|
1237
|
-
// pubid#203 class) — the tail's capture carries its separator.
|
|
1238
|
-
|
|
1239
|
-
|
|
1237
|
+
// pubid#203 class) — the tail's capture carries its separator. The
|
|
1238
|
+
// date-less form ("/D=CD1") elects the same face only when the input
|
|
1239
|
+
// spells the designator (the reference's original_input gate) — the
|
|
1240
|
+
// stage-first rows keep their ISO rendering.
|
|
1241
|
+
const dEqInput = this.originalInput.includes("/D=");
|
|
1242
|
+
const stageWordForGate = extractValue(parsed["iso_stage"]) ?? "";
|
|
1243
|
+
if (parsed["iso_stage"] !== undefined &&
|
|
1244
|
+
(parsed["draft_stage_year"] !== undefined ||
|
|
1245
|
+
(dEqInput && /\d$/.test(stageWordForGate)))) {
|
|
1246
|
+
const stageWord = stageWordForGate;
|
|
1240
1247
|
const pubs = (attributes["publishers"] ?? []);
|
|
1241
1248
|
if (pubs.length === 0) {
|
|
1242
1249
|
attributes["publishers"] = ["IEEE"];
|
|
@@ -190,13 +190,16 @@ export class IeeeDraft {
|
|
|
190
190
|
// ordinal stays short (one or two digits): a glued D= date
|
|
191
191
|
// ("-201908", the pubid#203 convention) must ride the version body
|
|
192
192
|
// verbatim, not fold into the iteration slot.
|
|
193
|
-
const compound = /=D?(PWI|NP|WD|CDV|FDIS|DIS|CD)(?:[.-]
|
|
193
|
+
const compound = /=D?(PWI|NP|WD|CDV|FDIS|DIS|CD)(\d{1,2}[a-z]?)?(?:[.-](\d{1,2}[a-z]?))?$/;
|
|
194
194
|
let isoStage;
|
|
195
195
|
let isoIteration;
|
|
196
196
|
const cm = compound.exec(body);
|
|
197
197
|
if (cm !== null) {
|
|
198
|
-
|
|
199
|
-
|
|
198
|
+
// The glued digits ride the STAGE ("D=CD1", matching the reference's
|
|
199
|
+
// "D=#{stage}" composition); only an explicit separator opens the
|
|
200
|
+
// ".iter" slot ("=DIS.3").
|
|
201
|
+
isoStage = cm[1] + (cm[2] ?? "");
|
|
202
|
+
isoIteration = cm[3];
|
|
200
203
|
body = body.slice(0, cm.index);
|
|
201
204
|
}
|
|
202
205
|
const monthAlt = Object.keys(DRAFT_MONTH_NAMES)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pubid/pubid",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.17",
|
|
4
4
|
"description": "TypeScript PubID identifiers: resolution, normalization and canonical hashes for every identifier in the pubid-testsuite corpus (41 standards bodies), with a conformance runner mirroring the Ruby reference",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|