This is an automated email from the ASF dual-hosted git repository. brondsem pushed a commit to branch db/8408 in repository https://gitbox.apache.org/repos/asf/allura.git
commit 3d467f099aef88799edf6f723c797e287b8ab2ce Author: Dave Brondsema <[email protected]> AuthorDate: Wed Feb 9 13:11:46 2022 -0500 fixup! [#8408] upgrade to markdown 3.1 --- Allura/allura/tests/test_globals.py | 34 +++++++++++++++++++++++++++-- Allura/allura/tests/unit/test_post_model.py | 5 +++-- 2 files changed, 35 insertions(+), 4 deletions(-) diff --git a/Allura/allura/tests/test_globals.py b/Allura/allura/tests/test_globals.py index 3268332..fa9572f 100644 --- a/Allura/allura/tests/test_globals.py +++ b/Allura/allura/tests/test_globals.py @@ -515,9 +515,39 @@ def test_markdown_list_without_break(): Regular text * first item * second item'''), + '<div class="markdown_content"><p>Regular text\n' # no <br> + '* first item\n' # no <br> + '* second item</p></div>' + ) + + assert_equal( + g.markdown.convert('''\ +Regular text +- first item +- second item'''), + '<div class="markdown_content"><p>Regular text<br/>\n' + '- first item<br/>\n' + '- second item</p></div>' + ) + + assert_equal( + g.markdown.convert('''\ +Regular text ++ first item ++ second item'''), + '<div class="markdown_content"><p>Regular text<br/>\n' + '+ first item<br/>\n' + '+ second item</p></div>' + ) + + assert_equal( + g.markdown.convert('''\ +Regular text +1. first item +2. second item'''), '<div class="markdown_content"><p>Regular text<br/>\n' - '<em> first item<br/>\n' - '</em> second item</p></div>' + '1. first item<br/>\n' + '2. second item</p></div>' ) diff --git a/Allura/allura/tests/unit/test_post_model.py b/Allura/allura/tests/unit/test_post_model.py index e99e673..214c831 100644 --- a/Allura/allura/tests/unit/test_post_model.py +++ b/Allura/allura/tests/unit/test_post_model.py @@ -47,10 +47,11 @@ class TestPostModel(WithDatabase): def test_activity_extras(self): self.post.text = """\ This is a **bold thing**, 40 chars here. + * Here's the first item in our list. * And here's the second item.""" + ','.join(map(str, list(range(200)))) assert 'allura_id' in self.post.activity_extras summary = self.post.activity_extras['summary'] assert summary.startswith("This is a bold thing, 40 chars here. Here's the first item in our list. " - "And here's the second item.") - assert summary.endswith('125,126,127...') + "And here's the second item."), summary # no formatting/HTML + assert summary.endswith('125,126,127...'), summary # it gets truncated
