From: Ronan Amicel Date: Sat, 7 Dec 2024 16:04:28 +0000 (+0100) Subject: Fix nl2br example in documentation (#2054) X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d680a959324400487b4f0e8b8119bed7376b7973;p=thirdparty%2Fjinja.git Fix nl2br example in documentation (#2054) --- diff --git a/docs/api.rst b/docs/api.rst index cb62f6c3..70d9a46b 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: