allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brond...@apache.org
Subject [09/12] allura git commit: Reset regex and ignore checklists
Date Thu, 13 Sep 2018 19:24:13 GMT
Reset regex and ignore checklists


Project: http://git-wip-us.apache.org/repos/asf/allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/allura/commit/54712989
Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/54712989
Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/54712989

Branch: refs/heads/master
Commit: 54712989b076fd7af9f45604b73cb2674ca0f8ce
Parents: 9e0eb36
Author: Shalitha <shalithasuranga@gmail.com>
Authored: Thu Sep 6 22:54:59 2018 +0530
Committer: Dave Brondsema <dbrondsema@slashdotmedia.com>
Committed: Thu Sep 13 19:18:27 2018 +0000

----------------------------------------------------------------------
 Allura/allura/lib/markdown_extensions.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/allura/blob/54712989/Allura/allura/lib/markdown_extensions.py
----------------------------------------------------------------------
diff --git a/Allura/allura/lib/markdown_extensions.py b/Allura/allura/lib/markdown_extensions.py
index 14724ed..ab5a06f 100644
--- a/Allura/allura/lib/markdown_extensions.py
+++ b/Allura/allura/lib/markdown_extensions.py
@@ -256,7 +256,7 @@ class ForgeExtension(markdown.Extension):
         md.inlinePatterns.add('autolink_without_brackets', AutolinkPattern(r'(http(?:s?)://[a-zA-Z0-9./\-\\_%?&=+#;~:!]+)',
md), '<escape')
         # replace the link pattern with our extended version
         md.inlinePatterns['link'] = ForgeLinkPattern(markdown.inlinepatterns.LINK_RE, md,
ext=self)
-        md.inlinePatterns['short_reference'] = ForgeLinkPattern(markdown.inlinepatterns.NOIMG
+ '\\[([^ x\\]]+)\\]', md, ext=self)
+        md.inlinePatterns['short_reference'] = ForgeLinkPattern(markdown.inlinepatterns.SHORT_REF_RE,
md, ext=self)
         # macro must be processed before links
         md.inlinePatterns.add('macro', ForgeMacroPattern(MACRO_PATTERN, md, ext=self), '<link')
         self.forge_link_tree_processor = ForgeLinkTreeProcessor(md)
@@ -290,6 +290,8 @@ class ForgeLinkPattern(markdown.inlinepatterns.LinkPattern):
         except IndexError:
             href = m.group(2)
             is_link_with_brackets = True
+            if(el.text == 'x' or el.text == ' '):
+                return '[' + el.text + ']'
         try:
             title = m.group(13)
         except IndexError:


Mime
View raw message