dsh-chat-link-actions 0.2.11 → 0.2.12

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 +2 -2
  2. package/package.json +1 -1
package/client.js CHANGED
@@ -250,7 +250,7 @@ window.__ModuleLoader__.load({
250
250
  var PATH_IN_TEXT = /(?:^|[\s"'“”「」()()\[\]<>])(@?"?(?:\/|[A-Za-z]:[\\/]|\\\\[^\\\s]+\\|~\/(?!\/))[^\s"'“”「」<>,。;:!?()【】《》]*)/u;
251
251
 
252
252
  /** 路径结尾成立的样子:有扩展名,或以分隔符收尾。 */
253
- var PATH_TAIL = /(?:\.[A-Za-z0-9]{1,8}|[\\/])$/u;
253
+ var PATH_TAIL = /(?:\.[A-Za-z0-9]{1,8}(?:#L\d+(?:-L?\d+)?(?::\d+)?)?|#L\d+(?::\d+)?|[\\/])$/u;
254
254
 
255
255
  /** 一段词像不像同一路径的下一段:不以分隔符或盘符开头,也不带句子标点。 */
256
256
  function continuesPath(word) {
@@ -337,7 +337,7 @@ window.__ModuleLoader__.load({
337
337
  /** Strip the line suffix a Markdown file link carries (`path#L12`). */
338
338
  function stripLineSuffix(value) {
339
339
  if (typeof value !== "string") return value;
340
- return value.replace(/#L[0-9]+(?:-L[0-9]+)?$/u, "");
340
+ return value.replace(/#L[0-9]+(?:-L?[0-9]+)?(?::[0-9]+)?$/u, "");
341
341
  }
342
342
 
343
343
  /** 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.11",
3
+ "version": "0.2.12",
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",