@podlite/markdown 0.0.13 → 0.0.14

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/lib/index.esm.js CHANGED
@@ -8392,7 +8392,7 @@ var require_AstTree = __commonJS({
8392
8392
  $ref: "#/definitions/BlockCaption"
8393
8393
  }
8394
8394
  ],
8395
- minItems: 2,
8395
+ minItems: 1,
8396
8396
  maxItems: 2
8397
8397
  },
8398
8398
  margin: {
@@ -8457,7 +8457,7 @@ var require_AstTree = __commonJS({
8457
8457
  $ref: "#/definitions/BlockCaption"
8458
8458
  }
8459
8459
  ],
8460
- minItems: 2,
8460
+ minItems: 1,
8461
8461
  maxItems: 2
8462
8462
  },
8463
8463
  margin: {
@@ -11068,7 +11068,7 @@ var require_PodliteDocument = __commonJS({
11068
11068
  $ref: "#/definitions/BlockCaption"
11069
11069
  }
11070
11070
  ],
11071
- minItems: 2,
11071
+ minItems: 1,
11072
11072
  maxItems: 2
11073
11073
  },
11074
11074
  margin: {
@@ -11133,7 +11133,7 @@ var require_PodliteDocument = __commonJS({
11133
11133
  $ref: "#/definitions/BlockCaption"
11134
11134
  }
11135
11135
  ],
11136
- minItems: 2,
11136
+ minItems: 1,
11137
11137
  maxItems: 2
11138
11138
  },
11139
11139
  margin: {
@@ -24927,7 +24927,7 @@ var require_package = __commonJS({
24927
24927
  "../podlite-schema/package.json"(exports, module) {
24928
24928
  module.exports = {
24929
24929
  name: "@podlite/schema",
24930
- version: "0.0.20",
24930
+ version: "0.0.21",
24931
24931
  description: "AST tools for Podlite markup language",
24932
24932
  main: "./src/index.ts",
24933
24933
  license: "MIT",
@@ -34951,10 +34951,10 @@ var md2ast = (src, { lineOffset } = { lineOffset: 0 }) => {
34951
34951
  ":image": (writer, processor) => (node, ctx, interator) => {
34952
34952
  const { title, alt, url, position: position2, ...attr } = node;
34953
34953
  let config = [];
34954
- return mkBlock({ type: "block", name: "Image", config, location: applyLineOffset(position2) }, [
34955
- mkImage(url, alt),
34956
- mkCaption([title])
34957
- ]);
34954
+ const content4 = [mkImage(url, alt)];
34955
+ if (title)
34956
+ content4.push(mkCaption([title]));
34957
+ return mkBlock({ type: "block", name: "Image", config, location: applyLineOffset(position2) }, content4);
34958
34958
  },
34959
34959
  ":thematicBreak": (writer, processor) => (node, ctx, interator) => {
34960
34960
  return null;