A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/Python-Markdown/markdown/issues/1160 below:

nl2br and toc extensions removes line that come immediatly after [toc] · Issue #1160 · Python-Markdown/markdown · GitHub

Issue

On this specific markdown (pay attention to the unique line return after the toc marker)

The nl2br and toc extensions used together remove the second line :

import markdown

parser = markdown.Markdown(extensions=['toc', 'nl2br'])

print(parser.convert("[TOC]\nWhere am I?",))

prints :

<div class="toc">
<ul></ul>
</div>
Expected behavior

From what I understand, and regarding previous versions (tested on Markdown==3.1.1), the result should be:

Context

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4