dsh-chat-link-actions 0.2.10 → 0.2.11
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/client.js +3 -3
- package/package.json +1 -1
package/client.js
CHANGED
|
@@ -187,7 +187,7 @@ window.__ModuleLoader__.load({
|
|
|
187
187
|
candidate = decodePercent(candidate);
|
|
188
188
|
if (/^\/[A-Za-z]:[\\/]/.test(candidate)) candidate = candidate.slice(1);
|
|
189
189
|
}
|
|
190
|
-
if (/^[A-Za-z]:(
|
|
190
|
+
if (/^[A-Za-z]:(?![\\/])/u.test(candidate)) candidate = candidate.slice(0, 2) + "/" + candidate.slice(2);
|
|
191
191
|
return looksAbsolute(candidate) ? candidate : null;
|
|
192
192
|
}
|
|
193
193
|
|
|
@@ -247,7 +247,7 @@ window.__ModuleLoader__.load({
|
|
|
247
247
|
}
|
|
248
248
|
|
|
249
249
|
/** An absolute path written as plain text inside the clicked element. */
|
|
250
|
-
var PATH_IN_TEXT = /(?:^|[\s"'“”「」()()\[\]<>])(@?"?(?:\/|[A-Za-z]:[\\/]|\\\\[^\\\s]+\\|~\/(?!\/))[^\s"'
|
|
250
|
+
var PATH_IN_TEXT = /(?:^|[\s"'“”「」()()\[\]<>])(@?"?(?:\/|[A-Za-z]:[\\/]|\\\\[^\\\s]+\\|~\/(?!\/))[^\s"'“”「」<>,。;:!?()【】《》]*)/u;
|
|
251
251
|
|
|
252
252
|
/** 路径结尾成立的样子:有扩展名,或以分隔符收尾。 */
|
|
253
253
|
var PATH_TAIL = /(?:\.[A-Za-z0-9]{1,8}|[\\/])$/u;
|
|
@@ -269,7 +269,7 @@ window.__ModuleLoader__.load({
|
|
|
269
269
|
for (var round = 0; round < 3; round += 1) {
|
|
270
270
|
var space = /^[ \t]+/u.exec(remaining);
|
|
271
271
|
if (space === null) break;
|
|
272
|
-
var word = /^[^ \t"'
|
|
272
|
+
var word = /^[^ \t"'“”「」<>,。;:!?、()【】《》]+/u.exec(remaining.slice(space[0].length));
|
|
273
273
|
if (word === null) break;
|
|
274
274
|
remaining = remaining.slice(space[0].length + word[0].length);
|
|
275
275
|
if (!continuesPath(word[0])) break;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-chat-link-actions",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.11",
|
|
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",
|