From 697021fcad3b3d8ff723be0e68df8659f713e5a9 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Thu, 10 Nov 2022 09:52:38 +0000 Subject: [PATCH] Fix markdown test --- markdown.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/markdown.py b/markdown.py index 1727f90fc..b43e53ce2 100644 --- a/markdown.py +++ b/markdown.py @@ -275,7 +275,7 @@ def _markdown_replace_code(markdown: str) -> str: line_ctr = 0 changed = False section_active = False - urlencode = False + url_encode = False html_escape_table = { "&": "&", '"': """, @@ -291,22 +291,22 @@ def _markdown_replace_code(markdown: str) -> str: if line.startswith('```'): if not section_active: if 'html' in line or 'xml' in line or 'rdf' in line: - urlencode = True + url_encode = True start_line = line_ctr section_active = True else: lines[start_line] = '' lines[line_ctr] = '' - if urlencode: + if url_encode: lines[start_line] = '
\n'
                     lines[line_ctr] = '\n
' - for line_num in range(start_line + 1, line_ctr): - lines[line_num] = \ - "".join(html_escape_table.get(char, char) - for char in lines[line_num]) + for line_num in range(start_line + 1, line_ctr): + lines[line_num] = \ + "".join(html_escape_table.get(char, char) + for char in lines[line_num]) section_active = False changed = True - urlencode = False + url_encode = False line_ctr += 1 if not changed: