Estevao Soares dos Santos 6 jaren geleden
bovenliggende
commit
c7a89eaae4
4 gewijzigde bestanden met toevoegingen van 5 en 1 verwijderingen
  1. 5 1
      dist/showdown.js
  2. 0 0
      dist/showdown.js.map
  3. 0 0
      dist/showdown.min.js
  4. 0 0
      dist/showdown.min.js.map

+ 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>';
     });
   }

File diff suppressed because it is too large
+ 0 - 0
dist/showdown.js.map


File diff suppressed because it is too large
+ 0 - 0
dist/showdown.min.js


File diff suppressed because it is too large
+ 0 - 0
dist/showdown.min.js.map


Some files were not shown because too many files changed in this diff