mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-01-29 06:27:49 +00:00
Update marky-markdown wrapping fix.
This commit is contained in:
@@ -33,10 +33,16 @@ function build(type) {
|
||||
$a.replaceWith($a.html());
|
||||
});
|
||||
|
||||
// Fix marky-markdown wrapping of sibling anchors.
|
||||
$('h3 ~ a').each(function() {
|
||||
var $a = $(this);
|
||||
$a.nextAll('p').first().append($a);
|
||||
// Fix marky-markdown wrapping around headers.
|
||||
$('p:empty + h3').prev().remove();
|
||||
|
||||
$('h3 ~ p:empty').each(function() {
|
||||
var $p = $(this),
|
||||
node = this.previousSibling;
|
||||
|
||||
while ((node = node.previousSibling) && node.name != 'h3' && node.name != 'p') {
|
||||
$p.prepend(node.nextSibling);
|
||||
}
|
||||
});
|
||||
|
||||
// Append YAML front matter.
|
||||
|
||||
Reference in New Issue
Block a user