You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@allura.apache.org by Dave Brondsema <da...@brondsema.net> on 2014/11/11 19:36:35 UTC

[allura:tickets] Ticket 4771 discussion

Latest commits cause text to be omitted sometimes.  Specifically it seems like a child page with a header will only include the text from the first line after the header.

Test case improvement:

~~~~
diff --git Allura/allura/tests/test_globals.py Allura/allura/tests/test_globals.py
index a68096d..5631026 100644
--- Allura/allura/tests/test_globals.py
+++ Allura/allura/tests/test_globals.py
@@ -256,34 +256,32 @@ def test_macro_project_admins_one_br():
 @td.with_wiki
 def test_macro_include_no_extra_br():
     p_nbhd = M.Neighborhood.query.get(name='Projects')
     p_test = M.Project.query.get(shortname='test', neighborhood_id=p_nbhd._id)
     wiki = p_test.app_instance('wiki')
     with h.push_context(p_test._id, app_config_id=wiki.config._id):
         p = WM.Page.upsert(title='Include_1')
-        p.text = 'included page 1'
+        p.text = '# page 1 title\nincluded page 1 line 1\nincluded page 1 line 2\nincluded page 1 line 3'
         p.commit()
         p = WM.Page.upsert(title='Include_2')
         p.text = 'included page 2'
         p.commit()
         p = WM.Page.upsert(title='Include_3')
         p.text = 'included page 3'
         p.commit()
         ThreadLocalORMSession.flush_all()
         md = '[[include ref=Include_1]]\n[[include ref=Include_2]]\n[[include ref=Include_3]]'
         html = g.markdown_wiki.convert(md)
 
     expected_html = '''
 <div class="markdown_content">
-<p>
-<div><div class="markdown_content"><p>included page 1</p></div></div>
+<div><div class="markdown_content"><h1 id="page-1-title">page 1 title</h1>
+<p>included page 1 line 1<br />included page 1 line 2<br />included page 1 line 3</p></div></div>
 <div><div class="markdown_content"><p>included page 2</p></div></div>
 <div><div class="markdown_content"><p>included page 3</p></div></div>
-</p>
-<p></p>
 </div>
 '''.strip().replace('\n', '')
     assert html.strip().replace('\n', '') == expected_html, html
 
 @with_setup(setUp, tearDown)
 @td.with_wiki
 @td.with_tool('test', 'Wiki', 'wiki2')
~~~~


---

** [tickets:#4771] TOC macro doesn't add headers of included pages [ss246]**

**Status:** review
**Milestone:** unreleased
**Labels:** p3 support 42cc sf-current sf-2 
**Created:** Thu Aug 23, 2012 12:41 PM UTC by Chris Tsai
**Last Updated:** Tue Nov 11, 2014 06:07 PM UTC
**Owner:** Igor Bondarenko

[forge:site-support:#246]

>On the page above there is a table of contents just underneath the Versions Heading, and then each of the headings after that are included from seperate pages per version. I would expect that the table of contents to display the headings from the included pages as well as the headings from the current page. This does not happen.

>It may just be me not quite understanding it, however it would be nice to have

I've put together a page demonstrating this here: https://sourceforge.net/p/strawhat/wiki/top/


---

Sent from forge-allura.apache.org because dev@allura.apache.org is subscribed to https://forge-allura.apache.org/p/allura/tickets/

To unsubscribe from further messages, a project admin can change settings at https://forge-allura.apache.org/p/allura/admin/tickets/options.  Or, if this is a mailing list, you can unsubscribe from the mailing list.