(text)
| 1019 | } |
| 1020 | |
| 1021 | function _EncodeCode(text) { |
| 1022 | // |
| 1023 | // Encode/escape certain characters inside Markdown code runs. |
| 1024 | // The point is that in code, these characters are literals, |
| 1025 | // and lose their special Markdown meanings. |
| 1026 | // |
| 1027 | // Encode all ampersands; HTML entities are not |
| 1028 | // entities within a Markdown code span. |
| 1029 | text = text.replace(/&/g, "&"); |
| 1030 | |
| 1031 | // Do the angle bracket song and dance: |
| 1032 | text = text.replace(/</g, "<"); |
| 1033 | text = text.replace(/>/g, ">"); |
| 1034 | |
| 1035 | // Now, escape characters that are magic in Markdown: |
| 1036 | text = escapeCharacters(text, "\*_{}[]\\", false); |
| 1037 | |
| 1038 | // jj the line above breaks this: |
| 1039 | //--- |
| 1040 | |
| 1041 | //* Item |
| 1042 | |
| 1043 | // 1. Subitem |
| 1044 | |
| 1045 | // special char: * |
| 1046 | //--- |
| 1047 | |
| 1048 | return text; |
| 1049 | } |
| 1050 | |
| 1051 | function _DoItalicsAndBold(text) { |
| 1052 |
no test coverage detected