Prechádzať zdrojové kódy

fix(codeSpans): add - and = to escaped chars inside code spans

Estevao Soares dos Santos 8 rokov pred
rodič
commit
4243a313fd

+ 1 - 8
dist/showdown.js

@@ -1678,14 +1678,7 @@ showdown.subParser('encodeCode', function (text, options, globals) {
     .replace(/</g, '&lt;')
     .replace(/>/g, '&gt;')
   // Now, escape characters that are magic in Markdown:
-    .replace(/([*_{}\[\]\\])/g, showdown.helper.escapeCharactersCallback);
-
-  // jj the line above breaks this:
-  //---
-  //* Item
-  //   1. Subitem
-  //            special char: *
-  // ---
+    .replace(/([*_{}\[\]\\=-])/g, showdown.helper.escapeCharactersCallback);
 
   text = globals.converter._dispatch('encodeCode.after', text, options, globals);
   return text;

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


+ 1 - 8
src/subParsers/encodeCode.js

@@ -16,14 +16,7 @@ showdown.subParser('encodeCode', function (text, options, globals) {
     .replace(/</g, '&lt;')
     .replace(/>/g, '&gt;')
   // Now, escape characters that are magic in Markdown:
-    .replace(/([*_{}\[\]\\])/g, showdown.helper.escapeCharactersCallback);
-
-  // jj the line above breaks this:
-  //---
-  //* Item
-  //   1. Subitem
-  //            special char: *
-  // ---
+    .replace(/([*_{}\[\]\\=-])/g, showdown.helper.escapeCharactersCallback);
 
   text = globals.converter._dispatch('encodeCode.after', text, options, globals);
   return text;

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