@pathmode/cli 2.1.0 → 2.1.1

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/index.js +23 -5
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -16379,7 +16379,7 @@ const isGitHubAction = (!!process.env.GITHUB_ACTIONS || !!process.env.INPUT_FILE
16379
16379
  program
16380
16380
  .name('pathmode')
16381
16381
  .description('Pathmode CLI — Intent Engineering for AI product teams')
16382
- .version('2.1.0');
16382
+ .version('2.1.1');
16383
16383
  // ============================================================
16384
16384
  // validate — Existing command (preserved)
16385
16385
  // ============================================================
@@ -17481,20 +17481,38 @@ exports.READINESS_BLOCKER_DESCRIPTIONS = {
17481
17481
  };
17482
17482
  /** Display order for the gate strip (title first, matching the Preflight page). */
17483
17483
  // ── Confirmation anchoring ──────────────────────────────────────────────────
17484
+ /**
17485
+ * Remove PAIRED markdown emphasis markers and nothing else.
17486
+ *
17487
+ * The earlier version replaced every asterisk in the text with nothing. That
17488
+ * was wrong in both directions at once: dropping a literal wildcard (`search * patterns` ->
17489
+ * `search patterns`) is a substantive edit that kept its confirmation live, while `_italic_` was
17490
+ * left alone so a formatting-only edit invalidated one. Emphasis needs an opening marker followed
17491
+ * by non-space and a matching closer, so a lone `*` or `_` survives. Looped because markers nest.
17492
+ */
17493
+ function stripEmphasis(text) {
17494
+ let prev;
17495
+ let out = text;
17496
+ do {
17497
+ prev = out;
17498
+ out = out.replace(/(\*\*|__|\*|_)(?=\S)([\s\S]*?\S)\1/g, '$2');
17499
+ } while (out !== prev);
17500
+ return out;
17501
+ }
17484
17502
  /**
17485
17503
  * Fold away everything that is a rewrite of the same claim, and nothing that is a change to it.
17486
17504
  * NFC because one glyph has two encodings; soft hyphens because editors inject them invisibly;
17487
- * quote/dash folding and markdown emphasis because adding `**` around a word is formatting, not
17488
- * a reword. Lowercased and whitespace-collapsed last.
17505
+ * quote/dash folding and PAIRED markdown emphasis because adding `**` around a word is
17506
+ * formatting, not a reword. An unpaired `*` or `_` is left alone: it is content (a wildcard),
17507
+ * and deleting it silently kept confirmations alive across a real change to the claim. Lowercased and whitespace-collapsed last.
17489
17508
  */
17490
17509
  function normalizeAnchor(value) {
17491
- return coerceText(value)
17510
+ return stripEmphasis(coerceText(value))
17492
17511
  .normalize('NFC')
17493
17512
  .replace(/­/g, '')
17494
17513
  .replace(/[‘’ʼ]/g, "'")
17495
17514
  .replace(/[“”]/g, '"')
17496
17515
  .replace(/[–—]/g, '-')
17497
- .replace(/\*/g, '')
17498
17516
  .replace(/\s+/g, ' ')
17499
17517
  .trim()
17500
17518
  .toLowerCase();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pathmode/cli",
3
- "version": "2.1.0",
3
+ "version": "2.1.1",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },