Ticket #1219 (closed enhancement: invalid)
How to transinclude a sub-heading?
|Reported by:||aplatypus||Owned by:||JeremyRuston|
I don't know if this is a bug or not; I wanted to set-up a transclusion that includes a sub-heading. I can see why it would be confusing to trnasclude a level-1 heading -- But I thought that in the normal course of life, including sub-headings is not only 'sensible' it is a very handy idea.
Now that I've said that, I think an extension to let one include even level-1 headings would still be handy.
I want to do something like (trans-)include this:
And have the display show
I've thought of two ways that it might work. The first is to allow some way to quote the entire transclusion (e.g. "\\!! subheading\\"), or to escape the header characters (e.g. "\!\!") so they are recognised after the transclusion.
A second possibility is to have a macro that makes a heading, so one transcludes the macro, and the result is rendered by the tiddler. E.g.
<<heading "H1", "subheading">>
Of course there may be more effective ways to achieve the same result. ---
What I believe is happening, is that the transclusion parser sees the first "!" as a heading and stops looking. It seems not toe really care that there might be more exclamation marks (!! subheading).
There are some examples, but the documentation didn't really tell me what the 'rules' are so may be it is working as intended.
One final comment, is the transclusion rendered before inclusion, or after inclusion? It looks like it is rendered before and included in the target 'as it would appear' for things like putting bullet points in tables. This behaviour with the header, seems to indicate that it is being rendered after, or during, the rendering of the target page. I think it makes a difference to what one expects to happen when using this most useful feature.