@digitalculture/ochre-sdk 0.5.1 → 0.5.3
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/dist/index.cjs +2 -2
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -2
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -243,7 +243,7 @@ function parseStringItem(item) {
|
|
|
243
243
|
break;
|
|
244
244
|
}
|
|
245
245
|
}
|
|
246
|
-
return returnString.replaceAll(/^(\d+)\./gm, String.raw`$1\.`);
|
|
246
|
+
return returnString.replaceAll("'", "'").replaceAll(/^(\d+)\./gm, String.raw`$1\.`);
|
|
247
247
|
}
|
|
248
248
|
function parseStringDocumentItem(item, footnotes) {
|
|
249
249
|
if (typeof item === "string" || typeof item === "number" || typeof item === "boolean") {
|
|
@@ -1176,7 +1176,7 @@ function parseResource(resource, isNested = false) {
|
|
|
1176
1176
|
Array.isArray(resource.notes.note) ? resource.notes.note : [resource.notes.note]
|
|
1177
1177
|
) : []
|
|
1178
1178
|
),
|
|
1179
|
-
description: resource.description ? parseStringContent(resource.description) : "",
|
|
1179
|
+
description: resource.description ? ["string", "number", "boolean"].includes(typeof resource.description) ? parseFakeString(resource.description) : parseStringContent(resource.description) : "",
|
|
1180
1180
|
document: resource.document ? parseDocument(resource.document.content) : null,
|
|
1181
1181
|
href: resource.href ?? null,
|
|
1182
1182
|
imageMap: resource.imagemap ? parseImageMap(resource.imagemap) : null,
|
package/dist/index.d.cts
CHANGED
|
@@ -893,7 +893,7 @@ type OchreResource = {
|
|
|
893
893
|
copyright?: FakeString;
|
|
894
894
|
identification: OchreIdentification;
|
|
895
895
|
href?: string;
|
|
896
|
-
description?: OchreStringContent;
|
|
896
|
+
description?: OchreStringContent | FakeString;
|
|
897
897
|
date?: string; // YYYY-MM-DD
|
|
898
898
|
image?: OchreImage;
|
|
899
899
|
creators?: { creator: OchrePerson | Array<OchrePerson> };
|
package/dist/index.d.ts
CHANGED
|
@@ -893,7 +893,7 @@ type OchreResource = {
|
|
|
893
893
|
copyright?: FakeString;
|
|
894
894
|
identification: OchreIdentification;
|
|
895
895
|
href?: string;
|
|
896
|
-
description?: OchreStringContent;
|
|
896
|
+
description?: OchreStringContent | FakeString;
|
|
897
897
|
date?: string; // YYYY-MM-DD
|
|
898
898
|
image?: OchreImage;
|
|
899
899
|
creators?: { creator: OchrePerson | Array<OchrePerson> };
|
package/dist/index.js
CHANGED
|
@@ -166,7 +166,7 @@ function parseStringItem(item) {
|
|
|
166
166
|
break;
|
|
167
167
|
}
|
|
168
168
|
}
|
|
169
|
-
return returnString.replaceAll(/^(\d+)\./gm, String.raw`$1\.`);
|
|
169
|
+
return returnString.replaceAll("'", "'").replaceAll(/^(\d+)\./gm, String.raw`$1\.`);
|
|
170
170
|
}
|
|
171
171
|
function parseStringDocumentItem(item, footnotes) {
|
|
172
172
|
if (typeof item === "string" || typeof item === "number" || typeof item === "boolean") {
|
|
@@ -1099,7 +1099,7 @@ function parseResource(resource, isNested = false) {
|
|
|
1099
1099
|
Array.isArray(resource.notes.note) ? resource.notes.note : [resource.notes.note]
|
|
1100
1100
|
) : []
|
|
1101
1101
|
),
|
|
1102
|
-
description: resource.description ? parseStringContent(resource.description) : "",
|
|
1102
|
+
description: resource.description ? ["string", "number", "boolean"].includes(typeof resource.description) ? parseFakeString(resource.description) : parseStringContent(resource.description) : "",
|
|
1103
1103
|
document: resource.document ? parseDocument(resource.document.content) : null,
|
|
1104
1104
|
href: resource.href ?? null,
|
|
1105
1105
|
imageMap: resource.imagemap ? parseImageMap(resource.imagemap) : null,
|
package/package.json
CHANGED