@podlite/markdown 0.0.14 → 0.0.16

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
@@ -8011,6 +8011,24 @@ var require_AstTree = __commonJS({
8011
8011
  ]
8012
8012
  }
8013
8013
  },
8014
+ align: {
8015
+ type: "array",
8016
+ items: {
8017
+ anyOf: [
8018
+ {
8019
+ enum: [
8020
+ "center",
8021
+ "left",
8022
+ "right"
8023
+ ],
8024
+ type: "string"
8025
+ },
8026
+ {
8027
+ type: "null"
8028
+ }
8029
+ ]
8030
+ }
8031
+ },
8014
8032
  text: {
8015
8033
  type: "string"
8016
8034
  },
@@ -10687,6 +10705,24 @@ var require_PodliteDocument = __commonJS({
10687
10705
  ]
10688
10706
  }
10689
10707
  },
10708
+ align: {
10709
+ type: "array",
10710
+ items: {
10711
+ anyOf: [
10712
+ {
10713
+ enum: [
10714
+ "center",
10715
+ "left",
10716
+ "right"
10717
+ ],
10718
+ type: "string"
10719
+ },
10720
+ {
10721
+ type: "null"
10722
+ }
10723
+ ]
10724
+ }
10725
+ },
10690
10726
  text: {
10691
10727
  type: "string"
10692
10728
  },
@@ -24927,7 +24963,7 @@ var require_package = __commonJS({
24927
24963
  "../podlite-schema/package.json"(exports, module) {
24928
24964
  module.exports = {
24929
24965
  name: "@podlite/schema",
24930
- version: "0.0.21",
24966
+ version: "0.0.23",
24931
24967
  description: "AST tools for Podlite markup language",
24932
24968
  main: "./src/index.ts",
24933
24969
  license: "MIT",
@@ -34964,12 +35000,19 @@ var md2ast = (src, { lineOffset } = { lineOffset: 0 }) => {
34964
35000
  return mkBlock({ name: "nested", location: applyLineOffset(position2) }, interator(children, { ...ctx }));
34965
35001
  },
34966
35002
  ":table": (writer, processor) => (node, ctx, interator) => {
34967
- const { children, position: position2, ...attr } = node;
34968
- return mkBlock({ name: "table", location: applyLineOffset(position2) }, interator(children, { ...ctx }));
35003
+ const { children, position: position2, align, ...attr } = node;
35004
+ return mkBlock(
35005
+ { name: "table", location: applyLineOffset(position2), align },
35006
+ interator(children, { ...ctx, isHeaderUsed: 0 })
35007
+ );
34969
35008
  },
34970
35009
  ":tableRow": (writer, processor) => (node, ctx, interator) => {
34971
35010
  const { children, position: position2, ...attr } = node;
34972
- return mkBlock({ name: "table_row", location: applyLineOffset(position2) }, interator(children, { ...ctx }));
35011
+ const isHeaderUsed = ctx.isHeaderUsed++;
35012
+ return mkBlock(
35013
+ { name: isHeaderUsed ? "table_row" : "table_head", location: applyLineOffset(position2) },
35014
+ interator(children, { ...ctx })
35015
+ );
34973
35016
  },
34974
35017
  ":tableCell": (writer, processor) => (node, ctx, interator) => {
34975
35018
  const { children, position: position2, ...attr } = node;