Estevao Soares dos Santos 6 rokov pred
rodič
commit
c7a89eaae4

+ 5 - 1
dist/showdown.js

@@ -2347,7 +2347,7 @@ showdown.subParser('makehtml.anchors', function (text, options, globals) {
 
   // Lastly handle GithubMentions if option is enabled
   if (options.ghMentions) {
-    text = text.replace(/(^|\s)(\\)?(@([a-z\d\-]+))(?=[.!?;,[\]()]|\s|$)/gmi, function (wm, st, escape, mentions, username) {
+    text = text.replace(/(^|\s)(\\)?(@([a-z\d]+(?:[a-z\d._-]+?[a-z\d]+)*))/gmi, function (wm, st, escape, mentions, username) {
       if (escape === '\\') {
         return st + mentions;
       }
@@ -2361,6 +2361,10 @@ showdown.subParser('makehtml.anchors', function (text, options, globals) {
       if (options.openLinksInNewWindow) {
         target = ' target="¨E95Eblank"';
       }
+
+      // lnk = showdown.helper.escapeCharacters(lnk, '*_', false); // replaced line to improve performance
+      lnk = lnk.replace(showdown.helper.regexes.asteriskDashAndColon, showdown.helper.escapeCharactersCallback);
+
       return st + '<a href="' + lnk + '"' + target + '>' + mentions + '</a>';
     });
   }

Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 0 - 0
dist/showdown.js.map


Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 0 - 0
dist/showdown.min.js


Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 0 - 0
dist/showdown.min.js.map


Niektoré súbory nie sú zobrazené, pretože je v týchto rozdielových dátach zmenené mnoho súborov