瀏覽代碼

fix(escapeSpecialCharsWithinTagAttributes): add ~ and = to escaped chars

Estevao Soares dos Santos 8 年之前
父節點
當前提交
bfcc0e44f0

+ 1 - 1
dist/showdown.js

@@ -1682,7 +1682,7 @@ showdown.subParser('escapeSpecialCharsWithinTagAttributes', function (text) {
     return wholeMatch
       .replace(/(.)<\/?code>(?=.)/g, '$1`')
     //tag = showdown.helper.escapeCharacters(tag, '\\`*_', false);
-      .replace(/([\\`*_])/g, showdown.helper.escapeCharactersCallback);
+      .replace(/([\\`*_ ~=])/g, showdown.helper.escapeCharactersCallback);
   });
 
   return text;

文件差異過大導致無法顯示
+ 0 - 0
dist/showdown.js.map


文件差異過大導致無法顯示
+ 0 - 0
dist/showdown.min.js


文件差異過大導致無法顯示
+ 0 - 0
dist/showdown.min.js.map


+ 1 - 1
src/subParsers/escapeSpecialCharsWithinTagAttributes.js

@@ -13,7 +13,7 @@ showdown.subParser('escapeSpecialCharsWithinTagAttributes', function (text) {
     return wholeMatch
       .replace(/(.)<\/?code>(?=.)/g, '$1`')
     //tag = showdown.helper.escapeCharacters(tag, '\\`*_', false);
-      .replace(/([\\`*_])/g, showdown.helper.escapeCharactersCallback);
+      .replace(/([\\`*_ ~=])/g, showdown.helper.escapeCharactersCallback);
   });
 
   return text;

部分文件因文件數量過多而無法顯示