You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by tv...@apache.org on 2013/05/23 15:34:49 UTC

[3/4] git commit: [#6105] ticket:321 convert a description to markdown for neighborhood_feeds

[#6105] ticket:321 convert a description to markdown for neighborhood_feeds


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

Branch: refs/heads/master
Commit: 76a1f1ef3f2455869937c759e7faaa907fea3c7e
Parents: 9293730
Author: Yuriy Arhipov <yu...@yandex.ru>
Authored: Mon Apr 29 17:11:05 2013 +0400
Committer: Tim Van Steenburgh <tv...@gmail.com>
Committed: Thu May 23 13:34:16 2013 +0000

----------------------------------------------------------------------
 Allura/allura/lib/macro.py          |    2 +-
 Allura/allura/tests/test_globals.py |    1 +
 2 files changed, 2 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/76a1f1ef/Allura/allura/lib/macro.py
----------------------------------------------------------------------
diff --git a/Allura/allura/lib/macro.py b/Allura/allura/lib/macro.py
index 496238e..88db722 100644
--- a/Allura/allura/lib/macro.py
+++ b/Allura/allura/lib/macro.py
@@ -94,7 +94,7 @@ def neighborhood_feeds(tool_name, max_number=5, sort='pubdate'):
                 title=item.title,
                 author=item.author_name,
                 ago=h.ago(item.pubdate),
-                description=item.description))
+                description=g.markdown.convert(item.description)))
         for item in feed)
     feeds = NeighborhoodFeeds(feeds=output)
     g.resource_manager.register(feeds)

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/76a1f1ef/Allura/allura/tests/test_globals.py
----------------------------------------------------------------------
diff --git a/Allura/allura/tests/test_globals.py b/Allura/allura/tests/test_globals.py
index 69b840f..c1c221a 100644
--- a/Allura/allura/tests/test_globals.py
+++ b/Allura/allura/tests/test_globals.py
@@ -364,6 +364,7 @@ def test_macro_nbhd_feeds():
     with h.push_context('--init--', 'wiki', neighborhood='Projects'):
         r = g.markdown_wiki.convert('[[neighborhood_feeds tool_name=wiki]]')
         assert 'Home modified by ' in r, r
+        assert '&lt;div class="markdown_content"&gt;' not in r
 
 
 def test_sort_alpha():