incubator-allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From john...@apache.org
Subject git commit: [#5805] handle leading tabs just like leading spaces since they can make preformatted blocks too
Date Thu, 07 Mar 2013 15:49:38 GMT
Updated Branches:
  refs/heads/master 8802894c9 -> 86b650abe


[#5805] handle leading tabs just like leading spaces since they can make preformatted blocks
too


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

Branch: refs/heads/master
Commit: 86b650abe1c323630cf58a7a7da9f6860e8e068b
Parents: 8802894
Author: Dave Brondsema <dbrondsema@geek.net>
Authored: Tue Mar 5 21:52:48 2013 +0000
Committer: Cory Johns <johnsca@geek.net>
Committed: Thu Mar 7 15:33:43 2013 +0000

----------------------------------------------------------------------
 ForgeBlog/forgeblog/command/rssfeeds.py    |    2 +-
 ForgeBlog/forgeblog/tests/test_commands.py |    5 ++++-
 2 files changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/86b650ab/ForgeBlog/forgeblog/command/rssfeeds.py
----------------------------------------------------------------------
diff --git a/ForgeBlog/forgeblog/command/rssfeeds.py b/ForgeBlog/forgeblog/command/rssfeeds.py
index ce601ef..80df661 100644
--- a/ForgeBlog/forgeblog/command/rssfeeds.py
+++ b/ForgeBlog/forgeblog/command/rssfeeds.py
@@ -38,7 +38,7 @@ re_amp = re.compile(r'''
       (\#x[0-9A-F]+;)  # hex entity
     )
     ''', re.VERBOSE)
-re_leading_spaces = re.compile(r'^[ ]+', re.MULTILINE)
+re_leading_spaces = re.compile(r'^[\t ]+', re.MULTILINE)
 re_preserve_spaces = re.compile(r'''
     [ ]           # space
     (?=[ ])       # lookahead for a space

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/86b650ab/ForgeBlog/forgeblog/tests/test_commands.py
----------------------------------------------------------------------
diff --git a/ForgeBlog/forgeblog/tests/test_commands.py b/ForgeBlog/forgeblog/tests/test_commands.py
index 8dc6aee..b830b62 100644
--- a/ForgeBlog/forgeblog/tests/test_commands.py
+++ b/ForgeBlog/forgeblog/tests/test_commands.py
@@ -171,7 +171,7 @@ http://blah.com/?x=y&a=b - not escaped either
     # note: the \# isn't necessary it could be just # but that's the way
     # html2text escapes all #s currently.  The extra escaping of \# ends up
     # being ok though when rendered
-    
+
     from forgeblog.command import rssfeeds
 
     assert_equal(rssfeeds.plain2markdown(text), expected)
@@ -181,3 +181,6 @@ http://blah.com/?x=y&a=b - not escaped either
 
     assert_equal(rssfeeds.plain2markdown('\ttab before (stuff)', preserve_multiple_spaces=True),
                  '&nbsp;&nbsp;&nbsp; tab before \(stuff\)')
+
+    assert_equal(rssfeeds.plain2markdown('\ttab before (stuff)', preserve_multiple_spaces=False),
+                 'tab before \(stuff\)')


Mime
View raw message