Feature #29588
openThere should be a way to avoid adding paragraph to a Textile block
0%
Description
Currently I can see no appropriate way of avoiding adding <p> block to any Textile code. Any text enclosed with \n is currently being put to the <p/> tag.
In php textile it is possible to avoid this by adding a space character in the beginning of the line (see https://txstyle.org/doc/2/paragraphs):
a line beginning with a space will be left untouched, and not wrapped in <p> ... </p> tags
One of the cases where the issue is important is when using the {{include}}
macro. Included pages are still enclosed in <p/> tag and this markup is usually wrong, because the included page is usually not a single paragraph, but contains some blocks, headers, etc itself.
Currently there is a bug (#13695) in currently used Redcloth3, which makes a workaround for the described issue. When you start the line with some other tag, the remaining text will not be enclosed in a paragraph:
<pre></pre>@{{include(page)}}@
The same example can be used with the code tag instead of the pre tag which will also work this way.
This can be used as a workaround, but since Redmine is slowly moving to RedCloth4 developers must ensure that the new Textile formatter will support not enclosing text blocks into paragraphs. In a quick scan of RedCloth4 doc I can't find a way to do so. Syntax like in php textile can be used for that, where "no-paragraph" is a line started with a space character.
No data to display