@raketa-builder/support 1.4.4 → 1.4.5

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.
Files changed (2) hide show
  1. package/dist/toHTML.js +4 -4
  2. package/package.json +1 -1
package/dist/toHTML.js CHANGED
@@ -6,14 +6,13 @@ const attributes = {
6
6
  name: "attributes",
7
7
  level: "inline",
8
8
  start(src) {
9
- var _a;
10
- return (_a = src.match(/\{([^}]*)\}/g)) == null ? void 0 : _a.index;
9
+ return src[0] === "{" ? 0 : void 0;
11
10
  },
12
11
  tokenizer(src, tokens) {
13
- const match = src.match(/\{([^}]*)\}/g);
12
+ const match = /^\{([^}]*)\}/.exec(src);
14
13
  if (match && tokens.length > 0) {
15
14
  const last = tokens[tokens.length - 1];
16
- if (last.type === "link") {
15
+ if (last.type === "link" && last.raw && src.startsWith("{", 0)) {
17
16
  last.attributes = parseAttrs(match[1]);
18
17
  return {
19
18
  type: "attributes",
@@ -21,6 +20,7 @@ const attributes = {
21
20
  };
22
21
  }
23
22
  }
23
+ return false;
24
24
  },
25
25
  renderer(token) {
26
26
  return "";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@raketa-builder/support",
3
- "version": "1.4.4",
3
+ "version": "1.4.5",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./dist/index.mjs",
6
6
  "types": "./dist/index.d.ts",