Issue with code blocks inside of a list
See original GitHub issueDescription: Code blocks inside of a list render weirdly with a code block inside a code block.
Input:
1. test:
```python
# coding: utf-8
class TestClass:
def __init__():
pass
def test():
pass
```
Expected output:
<ol>
<li><p>test:</p>
<pre><code class="python language-python"># coding: utf-8
class TestClass:
def __init__():
pass
def test():
pass</code></pre></li></ol>
Actual Output:
<ol>
<li><p>test:</p>
<pre><code class="python language-python"># coding: utf-8
class TestClass:
def __init__():
pass<pre><code>def test():
pass</code></pre></li></code></pre></ol>
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:5
Top Results From Across the Web
Markdown rendered incorrectly when code block is inside ...
A code block within a nested list causes GitLab's Markdown renderer to incorrectly render the nested list items as code blocks.
Read more >Common problems and solutions - Code::Blocks
Some parts of Code::Blocks or the back-end compiler may not support non ASCII characters (such as é) or possibly spaces. Try moving the...
Read more >Markdown: Code blocks in numbered lists #1855 - GitHub
I was able to have code blocks inside numbered lists while retaining the order of the list. It looks the code block shouldn't...
Read more >Code Block inside numbered lists and bullets, and more...
Code block is void of formatting. It is plain text. This contradicts the use of elements like bullet formatting - and it would...
Read more >Markdown formatting bug with code blocks in lists
The formatted text contains spurious newlines and indentation errors (not to speak of the randomly inserted HTML escape sequence). Even deleting ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

核心问题就是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-templateThank you for your reply. I have found the reason for the problem