allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kentontay...@apache.org
Subject [allura] 12/17: [#8325] upgrade markdown to 2.5.x
Date Wed, 04 Sep 2019 19:15:17 GMT
This is an automated email from the ASF dual-hosted git repository.

kentontaylor pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/allura.git

commit 5b16ee8f7c17e2bc22f7421603b58852569ce1b3
Author: Dave Brondsema <dave@brondsema.net>
AuthorDate: Wed Aug 21 12:48:53 2019 -0400

    [#8325] upgrade markdown to 2.5.x
---
 Allura/allura/lib/app_globals.py     | 10 ++++++----
 Allura/allura/lib/search.py          |  2 +-
 Allura/allura/tests/test_markdown.py |  2 +-
 requirements.in                      |  2 +-
 requirements.txt                     |  2 +-
 5 files changed, 10 insertions(+), 8 deletions(-)

diff --git a/Allura/allura/lib/app_globals.py b/Allura/allura/lib/app_globals.py
index 604ecaa..c6e96df 100644
--- a/Allura/allura/lib/app_globals.py
+++ b/Allura/allura/lib/app_globals.py
@@ -424,9 +424,11 @@ class Globals(object):
     def forge_markdown(self, **kwargs):
         '''return a markdown.Markdown object on which you can call convert'''
         return ForgeMarkdown(
-            extensions=['fenced_code', 'codehilite', 'extra',  # to allow markdown inside
HTML tags
-                        ForgeExtension(
-                            **kwargs), EmojiExtension(), UserMentionExtension(), 'tables',
'toc', 'nl2br', 'markdown_checklist.extension'],
+            extensions=['markdown.extensions.fenced_code', 'markdown.extensions.codehilite',
+                        'markdown.extensions.extra',  # to allow markdown inside HTML tags
+                        ForgeExtension(**kwargs), EmojiExtension(), UserMentionExtension(),
+                        'markdown.extensions.tables', 'markdown.extensions.toc', 'markdown.extensions.nl2br',
+                        'markdown_checklist.extension'],
             output_format='html4')
 
     @property
@@ -448,7 +450,7 @@ class Globals(object):
 
         """
         app = getattr(c, 'app', None)
-        return ForgeMarkdown(extensions=[CommitMessageExtension(app), EmojiExtension(), 'nl2br'],
+        return ForgeMarkdown(extensions=[CommitMessageExtension(app), EmojiExtension(), 'markdown.extensions.nl2br'],
                              output_format='html4')
 
     @property
diff --git a/Allura/allura/lib/search.py b/Allura/allura/lib/search.py
index 77fc1a7..91e75a9 100644
--- a/Allura/allura/lib/search.py
+++ b/Allura/allura/lib/search.py
@@ -337,7 +337,7 @@ def find_shortlinks(text):
     from .markdown_extensions import ForgeExtension
 
     md = markdown.Markdown(
-        extensions=['codehilite', ForgeExtension(), 'tables'],
+        extensions=['markdown.extensions.codehilite', ForgeExtension(), 'markdown.extensions.tables'],
         output_format='html4')
     md.convert(text)
     link_index = md.treeprocessors['links'].alinks
diff --git a/Allura/allura/tests/test_markdown.py b/Allura/allura/tests/test_markdown.py
index f362359..e122a25 100644
--- a/Allura/allura/tests/test_markdown.py
+++ b/Allura/allura/tests/test_markdown.py
@@ -143,6 +143,6 @@ Not *strong* or _underlined_."""
 <p>Not *strong* or _underlined_.</div>"""
 
         md = ForgeMarkdown(
-            extensions=[mde.CommitMessageExtension(app), 'nl2br'],
+            extensions=[mde.CommitMessageExtension(app), 'markdown.extensions.nl2br'],
             output_format='html4')
         self.assertEqual(md.convert(text), expected_html)
diff --git a/requirements.in b/requirements.in
index 38a14d8..4130800 100644
--- a/requirements.in
+++ b/requirements.in
@@ -15,7 +15,7 @@ FormEncode
 GitPython==2.1.11
 html5lib==1.0.1
 Jinja2==2.10
-Markdown<2.5
+Markdown<2.6
 markdown-checklist==0.4.1
 MarkupSafe
 Ming==0.5.6
diff --git a/requirements.txt b/requirements.txt
index bb2e357..71ae7a2 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -49,7 +49,7 @@ isort==4.3.21             # via pylint
 jinja2==2.10
 lazy-object-proxy==1.4.1  # via astroid
 markdown-checklist==0.4.1
-markdown==2.4.1
+markdown==2.5.2
 markupsafe==1.1.1
 mccabe==0.6.1             # via pylint
 ming==0.5.6


Mime
View raw message