You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by cc...@apache.org on 2026/02/05 18:19:04 UTC
(allura) branch master updated: [#8593] add new package to improve parsing of html lists
This is an automated email from the ASF dual-hosted git repository.
ccruz pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/allura.git
The following commit(s) were added to refs/heads/master by this push:
new 674e070e5 [#8593] add new package to improve parsing of html lists
674e070e5 is described below
commit 674e070e5ca7db7c75cf61d8efd2a3e3e49bd946
Author: Guillermo Cruz <gu...@slashdotmedia.com>
AuthorDate: Thu Jan 29 18:31:28 2026 +0000
[#8593] add new package to improve parsing of html lists
---
Allura/allura/lib/app_globals.py | 3 ++-
Allura/allura/tests/test_globals.py | 32 +++++++++++++++---------
ForgeGit/forgegit/tests/model/test_repository.py | 1 +
requirements.in | 1 +
4 files changed, 24 insertions(+), 13 deletions(-)
diff --git a/Allura/allura/lib/app_globals.py b/Allura/allura/lib/app_globals.py
index 7f1e104f9..72c798777 100644
--- a/Allura/allura/lib/app_globals.py
+++ b/Allura/allura/lib/app_globals.py
@@ -96,7 +96,8 @@ def toc_slugify_with_prefix(value, separator):
'markdown.extensions.tables',
toc.TocExtension(slugify=toc_slugify_with_prefix),
'markdown.extensions.nl2br',
- 'markdown_checklist.extension'],
+ 'markdown_checklist.extension',
+ 'mdx_breakless_lists',],
output_format='html')
def convert(self, source, render_limit=True) -> Markup:
diff --git a/Allura/allura/tests/test_globals.py b/Allura/allura/tests/test_globals.py
index 04f788ec6..2cbac57b4 100644
--- a/Allura/allura/tests/test_globals.py
+++ b/Allura/allura/tests/test_globals.py
@@ -506,36 +506,44 @@ def test_markdown_list_without_break(self):
Regular text
* first item
* second item''')) ==
- '<div class="markdown_content"><p>Regular text<br/>\n'
- '* first item<br/>\n'
- '* second item</p></div>')
+ '<div class="markdown_content"><p>Regular text</p>\n'
+ '<ul>\n'
+ '<li>first item</li>\n'
+ '<li>second item</li>\n'
+ '</ul></div>')
assert (
g.markdown.convert(dedent('''\
Regular text
- first item
- second item''')) ==
- '<div class="markdown_content"><p>Regular text<br/>\n'
- '- first item<br/>\n'
- '- second item</p></div>')
+ '<div class="markdown_content"><p>Regular text</p>\n'
+ '<ul>\n'
+ '<li>first item</li>\n'
+ '<li>second item</li>\n'
+ '</ul></div>')
assert (
g.markdown.convert(dedent('''\
Regular text
+ first item
+ second item''')) ==
- '<div class="markdown_content"><p>Regular text<br/>\n'
- '+ first item<br/>\n'
- '+ second item</p></div>')
+ '<div class="markdown_content"><p>Regular text</p>\n'
+ '<ul>\n'
+ '<li>first item</li>\n'
+ '<li>second item</li>\n'
+ '</ul></div>')
assert (
g.markdown.convert(dedent('''\
Regular text
1. first item
2. second item''')) ==
- '<div class="markdown_content"><p>Regular text<br/>\n'
- '1. first item<br/>\n'
- '2. second item</p></div>')
+ '<div class="markdown_content"><p>Regular text</p>\n'
+ '<ol>\n'
+ '<li>first item</li>\n'
+ '<li>second item</li>\n'
+ '</ol></div>')
def test_markdown_autolink(self):
tgt = 'http://everything2.com/?node=nate+oostendorp'
diff --git a/ForgeGit/forgegit/tests/model/test_repository.py b/ForgeGit/forgegit/tests/model/test_repository.py
index b4e57a051..7d981d3fb 100644
--- a/ForgeGit/forgegit/tests/model/test_repository.py
+++ b/ForgeGit/forgegit/tests/model/test_repository.py
@@ -470,6 +470,7 @@ def test_notification_html_and_plaintext(self):
assert '''<hr/>
<div class="markdown_content"><p>Add foo.txt. Commit ref <a class="alink" href="http://localhost/p/test/weird-chars/ci/616d24f8dd4e95cadd8e93df5061f09855d1a066/">[616d24f8dd4e95cadd8e93df5061f09855d1a066]</a> *bold* <b>bold</b></p>
<p>* one<br/>
+
* two<br/>
* three</p>
<p>http://example.com/</p></div>
diff --git a/requirements.in b/requirements.in
index 31e2955c9..a195ca4ed 100644
--- a/requirements.in
+++ b/requirements.in
@@ -22,6 +22,7 @@ legacy-cgi ; python_full_version >= '3.13'
lxml
Markdown
markdown-checklist
+mdx_breakless_lists
MarkupSafe
Ming
oauthlib