It makes sense to me that TOC be a treeprocessor, that seems appropriate.

I think ideally the "include" functionality would happen very early, so that 
all the content would be present for all the rest of the stages.  "include" is 
a macro, which is identified relatively as one of the `inlinePattern`s, but as 
you say the output isn't inserted until postprocessor stage when the 
`htmlStash` items get inserted.  That makes sense for all the other macros, as 
well as including a file (since it isn't markdown).  But for including another 
markdown page, I think we should grab the child markdown content and insert it 
into the current text right there (not using `htmlStash`).  Then the rest of 
the markdown pipeline will apply to it, and not even know it came from a child 
source.  How does that sound?  Perhaps the "include markdown" handling would 
have to be moved forward as a pre-processor, not sure.

That all said, I am willing to put this back on the backlog if we don't have a 
good solution.  I don't think we should spend tons of time or use a fragile 
solution.


---

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

**Status:** in-progress
**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 07:26 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 [email protected] 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.

Reply via email to