From d680a959324400487b4f0e8b8119bed7376b7973 Mon Sep 17 00:00:00 2001 From: Ronan Amicel Date: Sat, 7 Dec 2024 17:04:28 +0100 Subject: [PATCH] Fix nl2br example in documentation (#2054) --- docs/api.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/api.rst b/docs/api.rst index cb62f6c32..70d9a46be 100644 --- a/docs/api.rst +++ b/docs/api.rst @@ -697,10 +697,10 @@ enabled before escaping the input and marking the output safe. br = Markup(br) result = "\n\n".join( - f"

{br.join(p.splitlines())}<\p>" + f"

{br.join(p.splitlines())}

" 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: