Skip to content

docs: mistune: Remove incorrect claim about fenced code blocks#1107

Merged
jelmer merged 1 commit into
isso-comments:masterfrom
vincentbernat:fix/mistune-doc
Apr 20, 2026
Merged

docs: mistune: Remove incorrect claim about fenced code blocks#1107
jelmer merged 1 commit into
isso-comments:masterfrom
vincentbernat:fix/mistune-doc

Conversation

@vincentbernat
Copy link
Copy Markdown
Contributor

The guide claimed Mistune only understands three backticks, but it actually supports 4-space indented code blocks too.

import mistune
md = mistune.create_markdown(escape=True)
md('    indented code block\n    second line\n')
md('```\nbacktick fenced\n```\n')

Both render as <pre><code>...</code></pre>.

Checklist

  • All new and existing tests are passing
  • (If adding features:) I have added tests to cover my changes
  • (If docs changes needed:) I have updated the documentation accordingly.
  • I have added an entry to CHANGES.rst because this is a user-facing change or an important bugfix
  • I have written proper commit message(s)

The guide claimed Mistune only understands three backticks, but it
actually supports 4-space indented code blocks too.

    import mistune
    md = mistune.create_markdown(escape=True)
    md('    indented code block\n    second line\n')
    md('```\nbacktick fenced\n```\n')

Both render as `<pre><code>...</code></pre>`.
Comment thread docs/docs/guides/mistune.rst
@jelmer jelmer merged commit 73f01c7 into isso-comments:master Apr 20, 2026
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants