dsh-chat-link-actions 0.2.19 → 0.2.20

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/client.js +3 -1
  2. package/package.json +1 -1
package/client.js CHANGED
@@ -373,7 +373,9 @@ window.__ModuleLoader__.load({
373
373
  /** Strip the line suffix a Markdown file link carries (`path#L12`). */
374
374
  function stripLineSuffix(value) {
375
375
  if (typeof value !== "string") return value;
376
- return value.replace(/#L[0-9]+(?:-L?[0-9]+)?(?::[0-9]+)?$/u, "");
376
+ var trimmed = value.replace(/#L[0-9]+(?:-L?[0-9]+)?(?::[0-9]+)?$/u, "");
377
+ /* Windows 风格的 match:line 后缀(a.md:12)也当行号剥掉。 */
378
+ return trimmed.replace(/(\.[A-Za-z0-9]{1,8}):[0-9]+(?:-[0-9]+)?$/u, "$1");
377
379
  }
378
380
 
379
381
  /** Read the path a component's props carry, if any. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-chat-link-actions",
3
- "version": "0.2.19",
3
+ "version": "0.2.20",
4
4
  "description": "Right-click actions on file links in the DSH transcript: quote the path into the composer, or reveal the file in the OS file manager. Menus are drawn in the app's own style, never the system one.",
5
5
  "type": "module",
6
6
  "main": "index.js",