This is an automated email from the ASF dual-hosted git repository. gcruz pushed a commit to branch gc/8509 in repository https://gitbox.apache.org/repos/asf/allura.git
commit f15723b7b38e1434275213e7b3cf47e40e9590f3 Author: Guillermo Cruz <[email protected]> AuthorDate: Wed May 3 19:35:43 2023 +0000 [#8509] test and code updates related to Markdown --- Allura/allura/lib/markdown_extensions.py | 2 +- Allura/allura/tests/test_globals.py | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Allura/allura/lib/markdown_extensions.py b/Allura/allura/lib/markdown_extensions.py index 40c463487..ab7025d14 100644 --- a/Allura/allura/lib/markdown_extensions.py +++ b/Allura/allura/lib/markdown_extensions.py @@ -553,7 +553,7 @@ class AutolinkPattern(markdown.inlinepatterns.Pattern): result.text = old_link # since this is run before the builtin 'escape' processor, we have to # do our own unescaping - for char in self.markdown.ESCAPED_CHARS: + for char in self.md.ESCAPED_CHARS: old_link = old_link.replace('\\' + char, char) result.set('href', old_link) return result diff --git a/Allura/allura/tests/test_globals.py b/Allura/allura/tests/test_globals.py index 755f4fda2..6bc2e331d 100644 --- a/Allura/allura/tests/test_globals.py +++ b/Allura/allura/tests/test_globals.py @@ -497,6 +497,7 @@ class Test(): # this is not a valid way to make a list in original Markdown or python-markdown # https://github.com/Python-Markdown/markdown/issues/874 # it is valid in the CommonMark spec https://spec.commonmark.org/0.30/#lists + # for now the current version of Markdown seems to create a more well formed list with <br/> tags # TODO: try https://github.com/adamb70/mdx-breakless-lists # or https://gitlab.com/ayblaq/prependnewline assert ( @@ -504,8 +505,8 @@ class Test(): Regular text * first item * second item''')) == - '<div class="markdown_content"><p>Regular text\n' # no <br> - '* first item\n' # no <br> + '<div class="markdown_content"><p>Regular text<br/>\n' + '* first item<br/>\n' '* second item</p></div>') assert (
