ma-agents 3.15.4 → 3.15.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.
@@ -37,7 +37,7 @@
37
37
  "name": "ma-skills",
38
38
  "source": "./",
39
39
  "description": "ma-agents extension module providing enterprise SDLC personas and operational workflow skills.",
40
- "version": "3.15.4",
40
+ "version": "3.15.5",
41
41
  "author": {
42
42
  "name": "Alon Mayaffit"
43
43
  },
@@ -12163,7 +12163,9 @@ function renderDocumentPage(fileRec, manifest, projectRoot, navFlags, resolveAbs
12163
12163
  const a = node.anchor;
12164
12164
  if (!a || existingIds.has(a)) continue;
12165
12165
  existingIds.add(a);
12166
- const m = new RegExp('<a\\b[^>]*href="[^"]*#' + escRe(a) + '"', "i").exec(renderedHtml);
12166
+ const ra = escRe(a);
12167
+ let m = new RegExp('<a\\b[^>]*href="[^"]*#' + ra + '"[^>]*>[^<]*</a>\\s*:', "i").exec(renderedHtml);
12168
+ if (!m) m = new RegExp('<a\\b[^>]*href="[^"]*#' + ra + '"', "i").exec(renderedHtml);
12167
12169
  if (m) inlinePlacements.push({ idx: m.index, anchor: a });
12168
12170
  else fallbackAnchors.push(a);
12169
12171
  }
@@ -314,8 +314,15 @@ export function renderDocumentPage(
314
314
  const a = node.anchor;
315
315
  if (!a || existingIds.has(a)) continue;
316
316
  existingIds.add(a);
317
- // First <a> tag whose href ends with this exact anchor fragment.
318
- const m = new RegExp('<a\\b[^>]*href="[^"]*#' + escRe(a) + '"', 'i').exec(renderedHtml);
317
+ const ra = escRe(a);
318
+ // Prefer the DEFINITION occurrence a linkified mention immediately followed
319
+ // by a colon (the BMAD "**FRn:** description" / "## FRn: …" pattern) — over an
320
+ // earlier passing mention. Without this, an FR that a revision-history /
321
+ // changelog row lists near the top of the PRD ("…update FR21, FR91…") anchored
322
+ // there, so clicking the FR jumped to the changelog instead of its definition.
323
+ let m = new RegExp('<a\\b[^>]*href="[^"]*#' + ra + '"[^>]*>[^<]*</a>\\s*:', 'i').exec(renderedHtml);
324
+ // Otherwise fall back to the first linkified mention anywhere on the page.
325
+ if (!m) m = new RegExp('<a\\b[^>]*href="[^"]*#' + ra + '"', 'i').exec(renderedHtml);
319
326
  if (m) inlinePlacements.push({ idx: m.index, anchor: a });
320
327
  else fallbackAnchors.push(a);
321
328
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ma-agents",
3
- "version": "3.15.4",
3
+ "version": "3.15.5",
4
4
  "description": "NPX tool to install skills for AI coding agents (Claude Code, Gemini, Copilot, Kilocode, Cline, Cursor, Roo Code)",
5
5
  "main": "index.js",
6
6
  "bin": {