Closed EvanHsieh0415 closed 4 months ago
After some preliminary checks it seems that this issue arises from unparsed HTML entities.
Specifically, the character '>' is converted to '\>' in HTML, which causes the markdown parser to fail to recognize blockquote formatting.
One quick fix is to detect and replace all occurrences of >
into >
in the retrieved innerHTML:
// renderer.js line37
return {
mark: Array.from(msgPiece.getElementsByTagName("span"))
.map((e) => e.innerHTML)
.reduce((acc, x) => acc + x.replaceAll('>', '>'), ""), // Here add .replaceAll('>', '>')
replace: null
}
There might be a more elegant solution, but this should work for now.
## Quote Test
> Here is a blockquote.
>
> Multi-line is available.
## Nested Quote Test
> Outer
>
> Some content.
>> Inner
>> Inner content.
Output Screenshot:
輸入時:
發送後:
理想效果: