allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brond...@apache.org
Subject [allura] 11/17: [#8325] upgrade markdown to 2.4.x
Date Wed, 21 Aug 2019 21:41:18 GMT
This is an automated email from the ASF dual-hosted git repository.

brondsem pushed a commit to branch db/8325
in repository https://gitbox.apache.org/repos/asf/allura.git

commit 0217b218a9bb9c2426acf332a95f2084e0d7d029
Author: Dave Brondsema <dave@brondsema.net>
AuthorDate: Wed Aug 21 12:19:25 2019 -0400

    [#8325] upgrade markdown to 2.4.x
---
 Allura/allura/lib/app_globals.py         | 3 +--
 Allura/allura/lib/markdown_extensions.py | 3 ---
 requirements.in                          | 2 +-
 requirements.txt                         | 2 +-
 4 files changed, 3 insertions(+), 7 deletions(-)

diff --git a/Allura/allura/lib/app_globals.py b/Allura/allura/lib/app_globals.py
index a30607e..604ecaa 100644
--- a/Allura/allura/lib/app_globals.py
+++ b/Allura/allura/lib/app_globals.py
@@ -424,8 +424,7 @@ class Globals(object):
     def forge_markdown(self, **kwargs):
         '''return a markdown.Markdown object on which you can call convert'''
         return ForgeMarkdown(
-            # 'fenced_code'
-            extensions=['fenced_code', 'codehilite',
+            extensions=['fenced_code', 'codehilite', 'extra',  # to allow markdown inside
HTML tags
                         ForgeExtension(
                             **kwargs), EmojiExtension(), UserMentionExtension(), 'tables',
'toc', 'nl2br', 'markdown_checklist.extension'],
             output_format='html4')
diff --git a/Allura/allura/lib/markdown_extensions.py b/Allura/allura/lib/markdown_extensions.py
index 4f399a7..07e51d4 100644
--- a/Allura/allura/lib/markdown_extensions.py
+++ b/Allura/allura/lib/markdown_extensions.py
@@ -244,9 +244,6 @@ class ForgeExtension(markdown.Extension):
 
     def extendMarkdown(self, md, md_globals):
         md.registerExtension(self)
-        # allow markdown within e.g. <div markdown>...</div>  More info at:
-        # https://github.com/waylan/Python-Markdown/issues/52
-        md.preprocessors['html_block'].markdown_in_raw = True
         md.preprocessors.add('macro_include', ForgeMacroIncludePreprocessor(md), '_end')
         # this has to be before the 'escape' processor, otherwise weird
         # placeholders are inserted for escaped chars within urls, and then the
diff --git a/requirements.in b/requirements.in
index c05a8e8..38a14d8 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.4
+Markdown<2.5
 markdown-checklist==0.4.1
 MarkupSafe
 Ming==0.5.6
diff --git a/requirements.txt b/requirements.txt
index 5677271..bb2e357 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.3.1
+markdown==2.4.1
 markupsafe==1.1.1
 mccabe==0.6.1             # via pylint
 ming==0.5.6


Mime
View raw message