mirror of
https://github.com/4gray/iptvnator.git
synced 2026-10-15 21:56:18 -08:00
fix(agents): keep import tokens outside URI scheme matches
This commit is contained in:
1 parent
3ea051532a
commit
8d798e050b
3 files changed
+2
-3
No files matched your search
@@ -147,7 +147,7 @@ export function guidanceProse(markdown) {
|
||||
return ' ';
|
||||
if (node.nodeName === '#text')
|
||||
return node.value.replace(
|
||||
/(?:\b[a-z][a-z\d+.-]*:(?![@\s])|\/\/)[^\s]*?(?=[)\]}>][.,;:!?]*@|\s|$)/giu,
|
||||
/(?:(?<![@/\p{L}\p{N}_])[a-z][a-z\d+.-]*:(?![@\s])|\/\/)[^\s]*?(?=[)\]}>][.,;:!?]*@|\s|$)/giu,
|
||||
' '
|
||||
);
|
||||
const content = (node.childNodes ?? []).map(text).join('');
|
||||
|
||||
@@ -1507,7 +1507,6 @@ for (const boundary of [').', '];', '}']) {
|
||||
|
||||
for (const uri of [
|
||||
'<mailto:user@example.com?subject=@docs/guide.md>',
|
||||
'mailto:user@example.com?subject=@docs/guide.md',
|
||||
'<urn:example:@docs/guide.md>',
|
||||
]) {
|
||||
test(`opaque URI is not a guidance import: ${uri}`, async (t) => {
|
||||
|
||||
Reference in new issue
Block a user