(text)
| 1085 | |
| 1086 | |
| 1087 | var _EncodeCode = function(text) { |
| 1088 | // |
| 1089 | // Encode/escape certain characters inside Markdown code runs. |
| 1090 | // The point is that in code, these characters are literals, |
| 1091 | // and lose their special Markdown meanings. |
| 1092 | // |
| 1093 | // Encode all ampersands; HTML entities are not |
| 1094 | // entities within a Markdown code span. |
| 1095 | text = text.replace(/&/g,"&"); |
| 1096 | |
| 1097 | // Do the angle bracket song and dance: |
| 1098 | text = text.replace(/</g,"<"); |
| 1099 | text = text.replace(/>/g,">"); |
| 1100 | |
| 1101 | // Now, escape characters that are magic in Markdown: |
| 1102 | text = escapeCharacters(text,"\*_{}[]\\",false); |
| 1103 | |
| 1104 | // jj the line above breaks this: |
| 1105 | //--- |
| 1106 | |
| 1107 | //* Item |
| 1108 | |
| 1109 | // 1. Subitem |
| 1110 | |
| 1111 | // special char: * |
| 1112 | //--- |
| 1113 | |
| 1114 | return text; |
| 1115 | } |
| 1116 | |
| 1117 | |
| 1118 | var _DoItalicsAndBold = function(text) { |
no test coverage detected