mirror of
https://github.com/usememos/memos.git
synced 2024-11-11 07:24:18 +03:00
fix: add a span as wrapper to fix whitespace (#747)
This commit is contained in:
parent
35fed76d1a
commit
334da5e903
@ -60,8 +60,8 @@ console.log("hello world!")
|
|||||||
- [ ] finish my homework
|
- [ ] finish my homework
|
||||||
- [x] yahaha`,
|
- [x] yahaha`,
|
||||||
want: `<p>My task:</p>
|
want: `<p>My task:</p>
|
||||||
<p class='li-container'><span class='todo-block todo' data-value='TODO'></span>finish my homework</p>
|
<p class='li-container'><span class='todo-block todo' data-value='TODO'></span><span>finish my homework</span></p>
|
||||||
<p class='li-container'><span class='todo-block done' data-value='DONE'>✓</span>yahaha</p>`,
|
<p class='li-container'><span class='todo-block done' data-value='DONE'>✓</span><span>yahaha</span></p>`,
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
@ -76,8 +76,8 @@ console.log("hello world!")
|
|||||||
* list 123
|
* list 123
|
||||||
1. 123123`,
|
1. 123123`,
|
||||||
want: `<p>This is a list</p>
|
want: `<p>This is a list</p>
|
||||||
<p class='li-container'><span class='ul-block'>•</span>list 123</p>
|
<p class='li-container'><span class='ul-block'>•</span><span>list 123</span></p>
|
||||||
<p class='li-container'><span class='ol-block'>1.</span>123123</p>`,
|
<p class='li-container'><span class='ol-block'>1.</span><span>123123</span></p>`,
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -10,7 +10,7 @@ const renderer = (rawStr: string): string => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const parsedContent = marked(matchResult[1], [], inlineElementParserList);
|
const parsedContent = marked(matchResult[1], [], inlineElementParserList);
|
||||||
return `<p class='li-container'><span class='todo-block done' data-value='DONE'>✓</span>${parsedContent}</p>${matchResult[2]}`;
|
return `<p class='li-container'><span class='todo-block done' data-value='DONE'>✓</span><span>${parsedContent}</span></p>${matchResult[2]}`;
|
||||||
};
|
};
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
@ -10,7 +10,7 @@ const renderer = (rawStr: string): string => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const parsedContent = marked(matchResult[2], [], inlineElementParserList);
|
const parsedContent = marked(matchResult[2], [], inlineElementParserList);
|
||||||
return `<p class='li-container'><span class='ol-block'>${matchResult[1]}.</span>${parsedContent}</p>${matchResult[3]}`;
|
return `<p class='li-container'><span class='ol-block'>${matchResult[1]}.</span><span>${parsedContent}</span></p>${matchResult[3]}`;
|
||||||
};
|
};
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
@ -11,7 +11,9 @@ const renderer = (rawStr: string): string => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const parsedContent = marked(matchResult[1], [], inlineElementParserList);
|
const parsedContent = marked(matchResult[1], [], inlineElementParserList);
|
||||||
return `<p class='li-container'><span class='todo-block todo' data-value='TODO'></span>${parsedContent}</p>${escape(matchResult[2])}`;
|
return `<p class='li-container'><span class='todo-block todo' data-value='TODO'></span><span>${parsedContent}</span></p>${escape(
|
||||||
|
matchResult[2]
|
||||||
|
)}`;
|
||||||
};
|
};
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
@ -11,7 +11,7 @@ const renderer = (rawStr: string): string => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const parsedContent = marked(matchResult[1], [], inlineElementParserList);
|
const parsedContent = marked(matchResult[1], [], inlineElementParserList);
|
||||||
return `<p class='li-container'><span class='ul-block'>•</span>${parsedContent}</p>${escape(matchResult[2])}`;
|
return `<p class='li-container'><span class='ul-block'>•</span><span>${parsedContent}</span></p>${escape(matchResult[2])}`;
|
||||||
};
|
};
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
Loading…
Reference in New Issue
Block a user