Fixed pagedown performance issue
This commit is contained in:
parent
5252d20aac
commit
97a3bd7dae
@ -333,6 +333,8 @@ else
|
|||||||
/gm,function(){...}};
|
/gm,function(){...}};
|
||||||
*/
|
*/
|
||||||
//text = text.replace(/^(<(p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|script|noscript|form|fieldset|iframe|math)\b[^\r]*?.*<\/\2>[ \t]*(?=\n+)\n)/gm, hashElement);
|
//text = text.replace(/^(<(p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|script|noscript|form|fieldset|iframe|math)\b[^\r]*?.*<\/\2>[ \t]*(?=\n+)\n)/gm, hashElement);
|
||||||
|
|
||||||
|
// The .* is highly CPU consuming and I don't know what it's for (not even in the original showdown lib)
|
||||||
text = text.replace(/^(<(p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|script|noscript|form|fieldset|iframe|math)\b[^\r]*?<\/\2>[ \t]*(?=\n+)\n)/gm, hashElement);
|
text = text.replace(/^(<(p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|script|noscript|form|fieldset|iframe|math)\b[^\r]*?<\/\2>[ \t]*(?=\n+)\n)/gm, hashElement);
|
||||||
|
|
||||||
// Special case just for <hr />. It was easier to make a special case than
|
// Special case just for <hr />. It was easier to make a special case than
|
||||||
|
Loading…
Reference in New Issue
Block a user