Skip to content

Commit

Permalink
Merge pull request #75 from justindhillon/excluded-symboles
Browse files Browse the repository at this point in the history
Exclude { and " +
  • Loading branch information
justindhillon authored Feb 25, 2024
2 parents ffa000d + 12413a2 commit 99fe91f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export default async function linkInspector(arg: string, callback: any, path: st
if (!/^[\x00-\x7F]*$/.test(content)) return;

// Get all the links
const urlRegex: RegExp = /(?<!xmlns=['"])(?<!xmlns:.*=['"])(?<!targetNamespace=['"])(\bhttps?:\/\/(?!.*\${)[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/ig;
const urlRegex: RegExp = /(?<!xmlns=['"])(?<!xmlns:.*=['"])(?<!targetNamespace=['"])(\bhttps?:\/\/(?!.*\$)(?!.*{)(?!.*"\s\+)[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/ig;
const links: string[] = content.match(urlRegex) || [];

const directoryIndex: number = arg.indexOf(path);
Expand Down

0 comments on commit 99fe91f

Please sign in to comment.