@mulmoclaude/markdown-utils 1.3.0 → 1.3.2

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/README.md CHANGED
@@ -1,3 +1,11 @@
1
1
  # @mulmoclaude/markdown-utils
2
2
 
3
3
  Browser-safe markdown / image rendering utilities shared by the MulmoClaude host and the markdown plugin.
4
+
5
+ ## Related projects
6
+
7
+ Published from the MulmoClaude monorepo by [Receptron](https://github.com/receptron).
8
+
9
+ - **[MulmoClaude](https://github.com/receptron/mulmoclaude)** — an open-source AI assistant platform that runs on your own computer. Claude Code as the engine, a personal wiki for long-term memory, schema-driven collections for your data, and chat that summons the right GUI (markdown, charts, forms, spreadsheets, wikis) for each task.
10
+ - **[MulmoTerminal](https://github.com/receptron/mulmoterminal)** — a terminal-first cockpit for running many AI coding agents in parallel. One roster showing every session's summary and PR status, tmux-backed session persistence, git-worktree isolation, one-click PRs, and mobile push with remote reply.
11
+ - **[MulmoTerminal manual](https://receptron.github.io/mulmoterminal/)** — setup, workflows, feature reference, configuration, mobile notifications, and alternative / local model providers. Available in English and Japanese.
@@ -141,10 +141,24 @@ const RESOLVABLE_TAG_OUTER_RE = /<(?:img|source|video|audio)\b(?:[^>"']|"[^"]*"|
141
141
  // look like a tag.
142
142
  const TAG_NAME_RE = /^<([a-z]+)/i;
143
143
  // Attribute iterator: walks each `name=value` pair inside a tag. The
144
- // leading `\s+` ensures we only match real attribute boundaries, not
144
+ // leading `\s` ensures we only match real attribute boundaries, not
145
145
  // `src=` text embedded inside another attribute's quoted value.
146
+ //
147
+ // That leading class is a single `\s`, NOT `\s+`, and the difference is
148
+ // quadratic runtime rather than style. With `\s+`, a run of N spaces that
149
+ // is not followed by an attribute name makes the engine match all N, fail
150
+ // `[A-Za-z]`, then backtrack through every shorter length — repeated from
151
+ // every start position inside the run, so `<img` + N spaces + `!>` costs
152
+ // O(N²) (measured 4x per doubling; ~1.7s at N=32k). Matching one
153
+ // whitespace char cannot backtrack, so the same input is linear.
154
+ //
155
+ // Output is unaffected: under the `g` flag the scan advances one char at a
156
+ // time, so the match still lands on the whitespace immediately before the
157
+ // name. Any earlier whitespace simply falls outside the match and is
158
+ // copied through verbatim by `replace`.
159
+ //
146
160
  // Capture groups:
147
- // 1: leading whitespace
161
+ // 1: the single whitespace char before the attribute name
148
162
  // 2: attribute name
149
163
  // 3: `=` with surrounding spaces (only when value present)
150
164
  // 4: full quoted/unquoted value (unused but captured for clarity)
@@ -155,8 +169,8 @@ const TAG_NAME_RE = /^<([a-z]+)/i;
155
169
  // quote as the value
156
170
  //
157
171
  // All quantifiers bounded — verified ReDoS-safe in test_htmlSrcAttrs.ts.
158
- // eslint-disable-next-line sonarjs/super-linear-regex, sonarjs/regex-complexity, security/detect-unsafe-regex -- bounded quantifiers, ReDoS-safe (test in test_htmlSrcAttrs.ts)
159
- const ATTR_ITER_RE = /(\s+)([A-Za-z][\w:-]*)(?:(\s*=\s*)("([^"]*)"|'([^']*)'|([^\s>"'][^\s>]*)))?/g;
172
+ // eslint-disable-next-line sonarjs/regex-complexity, security/detect-unsafe-regex -- bounded quantifiers, ReDoS-safe (test in test_htmlSrcAttrs.ts)
173
+ const ATTR_ITER_RE = /(\s)([A-Za-z][\w:-]*)(?:(\s*=\s*)("([^"]*)"|'([^']*)'|([^\s>"'][^\s>]*)))?/g;
160
174
  /** Transform every URL-bearing attribute on a recognised tag.
161
175
  *
162
176
  * `transform` is invoked once per matching attribute value. Return:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mulmoclaude/markdown-utils",
3
- "version": "1.3.0",
3
+ "version": "1.3.2",
4
4
  "description": "Browser-safe markdown / image rendering utilities shared by the MulmoClaude host and the markdown plugin",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -33,7 +33,7 @@
33
33
  "license": "MIT",
34
34
  "author": "Receptron Team",
35
35
  "dependencies": {
36
- "@mulmoclaude/common": "^1.1.0",
36
+ "@mulmoclaude/common": "^1.1.1",
37
37
  "js-yaml": "^5.2.2",
38
38
  "marked": "^18.0.7"
39
39
  },
@@ -45,5 +45,20 @@
45
45
  "mermaid": "^11.16.0",
46
46
  "typescript": "^6.0.3",
47
47
  "vue": "^3.5.40"
48
+ },
49
+ "homepage": "https://github.com/receptron/mulmoclaude/tree/main/packages/markdown-utils#readme",
50
+ "repository": {
51
+ "type": "git",
52
+ "url": "git+https://github.com/receptron/mulmoclaude.git",
53
+ "directory": "packages/markdown-utils"
54
+ },
55
+ "keywords": [
56
+ "mulmoclaude",
57
+ "markdown",
58
+ "rendering",
59
+ "browser-safe"
60
+ ],
61
+ "bugs": {
62
+ "url": "https://github.com/receptron/mulmoclaude/issues"
48
63
  }
49
64
  }