diff --git a/packages/markdown-it-synapse/package.json b/packages/markdown-it-synapse/package.json index b721124541..51d7dfba0a 100644 --- a/packages/markdown-it-synapse/package.json +++ b/packages/markdown-it-synapse/package.json @@ -1,6 +1,6 @@ { "name": "markdown-it-synapse", - "version": "1.1.16", + "version": "1.1.17", "description": "tag for markdown-it markdown parser.", "main": "dist/index.cjs", "module": "dist/index.js", diff --git a/packages/markdown-it-synapse/src/index.ts b/packages/markdown-it-synapse/src/index.ts index 297f2ad8a2..63c71d3f87 100644 --- a/packages/markdown-it-synapse/src/index.ts +++ b/packages/markdown-it-synapse/src/index.ts @@ -346,11 +346,11 @@ function init_markdown_it( // if it has no href OR it is neither a synapse link or internal page link if (hrefIndex < 0 || !(isInternalPageLink || isInternalSynapseLink)) { tokens[idx].attrPush(['target', '_blank']) // add new attribute - tokens[idx].attrPush(['ref', 'noopener noreferrer']) // add new attribute + tokens[idx].attrPush(['rel', 'noopener noreferrer']) // add new attribute } } else { tokens[idx].attrs[aIndex][1] = '_blank' // replace value of existing attr - tokens[idx].attrPush(['ref', 'noopener noreferrer']) // add ref + tokens[idx].attrPush(['rel', 'noopener noreferrer']) // add ref } // pass token to default renderer. diff --git a/packages/markdown-it-synapse/test/fixtures/synapse.txt b/packages/markdown-it-synapse/test/fixtures/synapse.txt index 1c1e84854e..28934be618 100644 --- a/packages/markdown-it-synapse/test/fixtures/synapse.txt +++ b/packages/markdown-it-synapse/test/fixtures/synapse.txt @@ -67,37 +67,37 @@ And here's another ${reference?inlineWidget=true&text=My %5Freference%5F with pr . What if I mention @jay in a comment? . -
What if I mention
+ in a comment?What if I mention
. . @Beginning of line mention . - in a comment?+ of line mention
. . Mention at the @end . - of line mention
Mention at the
+Mention at the
. . Mention @xschildw, @withSupportedSpecialCharacters-._, @test! Expectation that it will not eat the comma or exclamation point. . -Mention
+ , , ! Expectation that it will not eat the comma or exclamation point.Mention
. . An email@address.com is not a mention . - , , ! Expectation that it will not eat the comma or exclamation point.An email@address.com is not a mention
+An email@address.com is not a mention
. . testing standard [link](http://link.com) . -testing standard link
+testing standard link
. . @@ -109,7 +109,7 @@ testing standard linkify syn123 auto-link . testing standard https://www.google.com auto-link . -testing standard https://www.google.com auto-link
+testing standard https://www.google.com auto-link
. .