优化marked对H1-H6的解析
parent
62074f4ab5
commit
e01081fdde
|
@ -865,6 +865,7 @@ Renderer.prototype.html = function(html) {
|
||||||
};
|
};
|
||||||
|
|
||||||
Renderer.prototype.heading = function(text, level, raw) {
|
Renderer.prototype.heading = function(text, level, raw) {
|
||||||
|
raw = text.replace(/<[^>]+>|<\/[^>]+>/g, '')
|
||||||
return '<h'
|
return '<h'
|
||||||
+ level
|
+ level
|
||||||
+ ' class="md-hd" id="'
|
+ ' class="md-hd" id="'
|
||||||
|
|
Reference in New Issue