|
@@ -2,7 +2,12 @@
|
|
|
* Transform markdown string to html
|
|
|
*/
|
|
|
String.prototype.toHTML = function() {
|
|
|
- return DOMPurify.sanitize(marked(this.toString()).replace(/<code>/g, '<pre class="prettyprint">').replace(/<\/code>/g, '</pre>'));
|
|
|
+ return DOMPurify.sanitize(
|
|
|
+ marked(this.toString())
|
|
|
+ .replace(/<code>/g, '<pre class="prettyprint">')
|
|
|
+ .replace(/<code class="/g, '<pre class="prettyprint ')
|
|
|
+ .replace(/<\/code>/g, '</pre>')
|
|
|
+ );
|
|
|
}
|
|
|
|
|
|
Array.prototype.removeItem = function(item) {
|