Skip to content

Commit

Permalink
Merge pull request #228 from aws/dogusata/fix-linkify-skips-double-sq…
Browse files Browse the repository at this point in the history
…uare-bracket-texts

fix: Linkify skips double square brackets for text
  • Loading branch information
dogusata authored Feb 3, 2025
2 parents d6cae22 + c8faf7c commit c7a9cb0
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@aws/mynah-ui",
"displayName": "AWS Mynah UI",
"version": "4.22.0",
"version": "4.22.1",
"description": "AWS Toolkit VSCode and Intellij IDE Extension Mynah UI",
"publisher": "Amazon Web Services",
"license": "Apache License 2.0",
Expand Down
2 changes: 1 addition & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ ${item.task ? `<input ${item.checked === true ? 'checked' : ''} disabled type="c
${(item.task ? marked.parseInline : marked.parse)(item.text, { breaks: false }) as string}
</li>`,
link: (token) => {
const pattern = /^\[([^\]]+)\]\(([^)]+)\)$/;
const pattern = /^\[(?:\[([^\]]+)\]|([^\]]+))\]\(([^)]+)\)$/;
// Expect raw formatted only in [TEXT](URL)
if (!pattern.test(token.raw)) {
return token.href;
Expand Down

0 comments on commit c7a9cb0

Please sign in to comment.