# ‹› `` `markdown.extensions.nl2br`

A Python-Markdown extension to treat newlines as hard breaks. Similar to GitHub-flavored Markdown’s behavior.

See the documentation for details.

Classes:

- `Nl2BrExtension` –

  Newline-to-break extension for Python-Markdown.

## ‹› `` `markdown.extensions.nl2br.Nl2BrExtension(**kwargs)`

Bases: `Extension`

Newline-to-break extension for Python-Markdown.

Methods:

- `extendMarkdown` –

  Register the processor.

### ‹› `` `markdown.extensions.nl2br.Nl2BrExtension.extendMarkdown(md)`

Register the processor.

Class Instance | Registry | Name | Priority
--- | --- | --- | ---
`SubstituteTagInlineProcessor` | `inlinepatterns` | `nl` | `5`