ochre-sdk 1.0.36 → 1.0.38

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.
@@ -272,6 +272,7 @@ function parseNestedStringItems(items, contentItem, options) {
272
272
  rawMDXBlocks: options.rawMDXBlocks
273
273
  });
274
274
  }
275
+ if (rawMDXBlock !== "" && !rawMDXBlock.endsWith("\n") && item.whitespace?.split(" ").includes("newline") === true) rawMDXBlock += "\n";
275
276
  if (options.rendering === "rich" && options.rawMDXBlocks != null) {
276
277
  const placeholder = `${RAW_MDX_BLOCK_PLACEHOLDER_PREFIX}${options.rawMDXBlocks.length}${RAW_MDX_BLOCK_PLACEHOLDER_SUFFIX}`;
277
278
  options.rawMDXBlocks.push(rawMDXBlock);
@@ -314,7 +314,7 @@ function parseWebElementProperties(componentProperty, elementResource, options,
314
314
  break;
315
315
  }
316
316
  case "bibliography": {
317
- const itemLinks = websiteLinks.filter((link) => link.category !== "bibliography");
317
+ const itemLinks = websiteLinks.filter((link) => link.category === "bibliography");
318
318
  const bibliographies = parseBibliographyList(elementResource.bibliographies, options);
319
319
  if (itemLinks.length === 0 && bibliographies.length === 0) throw new Error(formatComponentError("No links found", componentName, elementResource), { cause: componentProperty });
320
320
  const layout = componentReader.valueOr("layout", "long");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ochre-sdk",
3
- "version": "1.0.36",
3
+ "version": "1.0.38",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "description": "Node.js library for working with OCHRE (Online Cultural and Historical Research Environment) data",