You are not logged in.
I’m presenting an excerpt inline and I want to get rid of the paragraph elements (
</p>) generated by Textile— but I want to keep Textile on for the typography and stuff. Is there a way to do this?
I’m excerpting the same articles in another context, and I want those excerpts untouched, so changing the excerpts at the article level isn’t what I need.
Edit: The solution was right under my nose!
Last edited by johnstephens (2009-05-15 16:58:59)
notextile. and then one space before your text and it will remove the <p> tags.
Last edited by immarabi (2009-05-14 01:13:23)
notextile. seems to eliminate all Textile, the same as choosing “Leave text untouched” under “Excerpt Markup”. As I said before, I want to keep Textile active for its typography and automatic escaping of
The other thing is that I don’t want to strip the paragraph element from the excerpt in every context, just in this listform:
<li><strong><txp:title />:</strong> <txp:excerpt /></li>
Elsewhere, I’m using the same excerpt, and I want to keep the
<h3>About this thing: </h3> <txp:excerpt />
I expect that php-jujitsu may be needed to accomplish this.
Last edited by johnstephens (2009-05-14 01:39:42)
Or a slightly simpler pattern:
<txp:pax_grep from="/<\/?p>/" to=""><txp:excerpt /></txp:pax_grep>
The various native methods are outlined in this TXP Tip.
Thanks, Jonathan— I’m a huge fan of TXP Tips, and I’ve seen this article before.
Those methods would be fine if the excerpt was never supposed to have
<p> elements, but as I said before, I’m still using the normal
<p>-wrapped excerpts for these articles in another context. Doing Textile-fu on the article level doesn’t allow for that differentiation, and requires thinking about it every time I write a new article in that section.
Haven’t you tried putting a space before the excerpt text? This works on ThresoldState at least…