Skip to content

Commit 57e1a92

Browse files
committed
fix missing link text regex
1 parent 8896552 commit 57e1a92

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/scripts/markdownChecker.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ const INCORRECT_PATH_IN_TRANSLATED_MARKDOWN = new RegExp(
4242
"g"
4343
)
4444

45-
const LINK_TEXT_MISSING_REGEX = new RegExp("\\[\\]\\(([^)]+)\\)", "g");
45+
const LINK_TEXT_MISSING_REGEX = new RegExp("(?<![\\S])\\[\\]\\(([^)]+)\\)", "g")
4646

4747
// add <emoji
4848
// add /developers/docs/scaling/#layer-2-scaling
@@ -222,7 +222,6 @@ function processMarkdown(path: string) {
222222

223223
// Check for links missing text
224224
while ((linkTextMissingMatch = LINK_TEXT_MISSING_REGEX.exec(markdownFile))) {
225-
console.log('here')
226225
const lineNumber = getLineNumber(
227226
markdownFile,
228227
linkTextMissingMatch.index

0 commit comments

Comments
 (0)