Skip to content

Commit

Permalink
Fix nl2br example in documentation (#2054)
Browse files Browse the repository at this point in the history
  • Loading branch information
ronnix authored Dec 7, 2024
1 parent ada0a9a commit d680a95
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -697,10 +697,10 @@ enabled before escaping the input and marking the output safe.
br = Markup(br)
result = "\n\n".join(
f"<p>{br.join(p.splitlines())}<\p>"
f"<p>{br.join(p.splitlines())}</p>"
for p in re.split(r"(?:\r\n|\r(?!\n)|\n){2,}", value)
)
return Markup(result) if autoescape else result
return Markup(result) if eval_ctx.autoescape else result
.. _writing-tests:
Expand Down

0 comments on commit d680a95

Please sign in to comment.