@incremark/core 0.3.8 → 0.3.10

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.
@@ -1060,6 +1060,18 @@ function transformOptimisticReference(token, ctx) {
1060
1060
  }]
1061
1061
  };
1062
1062
  }
1063
+ if (token.referenceType === "shortcut") {
1064
+ const inlineLinkMatch = token.text.match(/^\[((?:\[[^\]]*\]|[^\[\]])*)\]\(([^)]*)\)$/);
1065
+ const inlineImageMatch = token.text.match(/^!\[((?:\[[^\]]*\]|[^\[\]])*)\]\(([^)]*)\)$/);
1066
+ if (inlineLinkMatch || inlineImageMatch) {
1067
+ const innerChildren = ctx.transformInline(new Lexer().inlineTokens(token.text));
1068
+ return [
1069
+ { type: "text", value: "[" },
1070
+ ...innerChildren,
1071
+ { type: "text", value: "]" }
1072
+ ];
1073
+ }
1074
+ }
1063
1075
  const labelChildren = ctx.transformInline(new Lexer().inlineTokens(token.text));
1064
1076
  return {
1065
1077
  type: "linkReference",