@podlite/markdown 0.0.12 → 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: {
@@ -8867,6 +8867,16 @@ var require_AstTree = __commonJS({
8867
8867
  {
8868
8868
  $ref: "#/definitions/Text"
8869
8869
  },
8870
+ {
8871
+ type: "array",
8872
+ items: [
8873
+ {
8874
+ $ref: "#/definitions/Text"
8875
+ }
8876
+ ],
8877
+ minItems: 1,
8878
+ maxItems: 1
8879
+ },
8870
8880
  {
8871
8881
  type: "string"
8872
8882
  }
@@ -11058,7 +11068,7 @@ var require_PodliteDocument = __commonJS({
11058
11068
  $ref: "#/definitions/BlockCaption"
11059
11069
  }
11060
11070
  ],
11061
- minItems: 2,
11071
+ minItems: 1,
11062
11072
  maxItems: 2
11063
11073
  },
11064
11074
  margin: {
@@ -11123,7 +11133,7 @@ var require_PodliteDocument = __commonJS({
11123
11133
  $ref: "#/definitions/BlockCaption"
11124
11134
  }
11125
11135
  ],
11126
- minItems: 2,
11136
+ minItems: 1,
11127
11137
  maxItems: 2
11128
11138
  },
11129
11139
  margin: {
@@ -11533,6 +11543,16 @@ var require_PodliteDocument = __commonJS({
11533
11543
  {
11534
11544
  $ref: "#/definitions/Text"
11535
11545
  },
11546
+ {
11547
+ type: "array",
11548
+ items: [
11549
+ {
11550
+ $ref: "#/definitions/Text"
11551
+ }
11552
+ ],
11553
+ minItems: 1,
11554
+ maxItems: 1
11555
+ },
11536
11556
  {
11537
11557
  type: "string"
11538
11558
  }
@@ -24907,7 +24927,7 @@ var require_package = __commonJS({
24907
24927
  "../podlite-schema/package.json"(exports, module) {
24908
24928
  module.exports = {
24909
24929
  name: "@podlite/schema",
24910
- version: "0.0.19",
24930
+ version: "0.0.21",
24911
24931
  description: "AST tools for Podlite markup language",
24912
24932
  main: "./src/index.ts",
24913
24933
  license: "MIT",
@@ -34931,10 +34951,10 @@ var md2ast = (src, { lineOffset } = { lineOffset: 0 }) => {
34931
34951
  ":image": (writer, processor) => (node, ctx, interator) => {
34932
34952
  const { title, alt, url, position: position2, ...attr } = node;
34933
34953
  let config = [];
34934
- return mkBlock({ type: "block", name: "Image", config, location: applyLineOffset(position2) }, [
34935
- mkImage(url, alt),
34936
- mkCaption([title])
34937
- ]);
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);
34938
34958
  },
34939
34959
  ":thematicBreak": (writer, processor) => (node, ctx, interator) => {
34940
34960
  return null;