fix(md): ensure list offset when rendering (#19241)
This commit is contained in:
parent
6d82460a02
commit
291ad6e618
|
|
@ -283,8 +283,8 @@ function render(nodes, options) {
|
||||||
*/
|
*/
|
||||||
function innerRenderMdNode(indent, node, lastNode, result, options) {
|
function innerRenderMdNode(indent, node, lastNode, result, options) {
|
||||||
const newLine = () => {
|
const newLine = () => {
|
||||||
if (result.length && result[result.length - 1] !== '')
|
if (result.length && (result[result.length - 1] || '').trim() !== '')
|
||||||
result.push('');
|
result.push(indent);
|
||||||
};
|
};
|
||||||
|
|
||||||
if (node.type.startsWith('h')) {
|
if (node.type.startsWith('h')) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue