Skip to content

Commit

Permalink
check for ... at end of context
Browse files Browse the repository at this point in the history
  • Loading branch information
MatthiasAtSAP committed Jan 19, 2024
1 parent e163a24 commit 32c9508
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion .github/etc/create-review.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,12 @@ module.exports = async ({ github, require, exec, core }) => {
}

if (rule === 'MD042/no-empty-links') {
const link = context.match(/\[Context: "(\[.*?)"\]/)[1]
let link = context.match(/\[Context: "(\[.*?)"\]/)[1]

// if the context is too long, markdownlint-cli will truncate the string and append "..." at the end
if (link.endsWith('...')) {
link = link.substring(0, link.length - 3)
}

contextText = `[Context: "${escapeMarkdownlink(link)}"]`

Expand Down

0 comments on commit 32c9508

Please sign in to comment.