Open JohnPeel opened 3 years ago
For more context,
I'm using github flavor, and my example program is below.
const content = `
1. test:
\`\`\`python
# coding: utf-8
class TestClass:
def __init__():
pass
def test():
pass
\`\`\``;
const showdown = require("showdown");
const converter = new showdown.Converter();
converter.setFlavor("github");
console.log(converter.makeHtml(content));
大哥Have you solved this problem?
大哥Have you solved this problem?
Nope. I don't remember exactly what I did, but I think I moved away from showdown.
大哥Have you solved this problem?
Nope. I don't remember exactly what I did, but I think I moved away from showdown.
Thank you for your reply. I have found the reason for the problem
核心问题就是pre里的<> 会被转义为字符实体。showdown只接受<>才会正常工作
The core problem is that < > in pre will be escaped into character entities. Showdown works only if it accepts < >
https://github.com/aote777/anki-md-template
大哥Have you solved this problem?
Nope. I don't remember exactly what I did, but I think I moved away from showdown.
Can you suggest an alternative to showdown?
大哥Have you solved this problem?
Nope. I don't remember exactly what I did, but I think I moved away from showdown.
Can you suggest an alternative to showdown?
Oof, It's been so long, I don't actually remember what I moved to. Sorry.
Description: Code blocks inside of a list render weirdly with a code block inside a code block.
Input:
Actual Output: