Skip to content

Commit

Permalink
fix: regex for project format checker
Browse files Browse the repository at this point in the history
  • Loading branch information
targos committed Jul 20, 2024
1 parent 0a6d0b1 commit 53154fa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/format-checkers/Project.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { FormatChecker } from '../framework/index.js';

const urlRegexp = String.raw`<?https?:\/\/(?:www\.)?[-\w@:%.\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b(?:[-\w()@:%\+.~#?&//=]*)>?`;
const headerRegexp = String.raw`(?:[a-zA-Z0-9_\- ]|(?:<a?:\w{2,32}:\d{17,20}>)|(?::\w{2,32}:)|(?:\p{Emoji_Presentation}\p{Emoji_Modifier}*))+`;
const headerRegexp = String.raw`(?:[a-zA-Z0-9_\- ]|(?:<a?:\w{2,32}:\d{17,20}>)|(?::\w{2,32}:)|(?:\p{Emoji_Presentation}\p{Emoji_Modifier}*))`;
const projectRegexp = new RegExp(
String.raw`^\*\*${headerRegexp}+\*\*\n\n(?:.*\n)+\n(?:(?:${headerRegexp}* )?${urlRegexp}\n)+$`,
'u',
Expand Down

0 comments on commit 53154fa

Please sign in to comment.