Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Re: Can I escape <p> without Textile?
Offline
Re: Can I escape <p> without Textile?
RedFox wrote #314534:
It doesn’t … :o
Shucks! Maybe it needs some extra \s?
in there for possible spaces in the markup?
But if txp 4.7.2 will stop adding p
tags around tags at the beginning of a line, it will soon no longer be necessary anyway…
TXP Builders – finely-crafted code, design and txp
Offline
Re: Can I escape <p> without Textile?
etc wrote #314533:
Done in 4.7.2 txp Textile, soon on Pete’s demo site, please test.
Hurray!
Me just spend some quality time inserting some <txp::short-code />
in the body of some articles; freaky thing (the short-code form) that contains textile formatting.
notextile. <txp::my_shortcode evaluate="textile" />
Thank you Oleg.
Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern
Offline
Re: Can I escape <p> without Textile?
Fine if you find it useful, gentlemen, just note that this change is roughly equivalent to prepending a space, I don’t know whether it has the same effect that notextile
. Let me know if that’s not enough.
Edit: seemingly, a space is not notextile
: the block is still textiled, just not wrapped in <p></p>
. Which mode should we choose for line-starting <tag>
?
Last edited by etc (2018-10-11 10:02:37)
Offline
Re: Can I escape <p> without Textile?
etc wrote #314539:
Edit: seemingly, a space is not
notextile
: the block is still textiled, just not wrapped in<p></p>
. Which mode should we choose for line-starting<tag>
?
The first one, space, I think.
I use notextile.
regularly instead of space
because it is much more readable. Purpose is most of the time inserting something like short tags (or in the past txp:output_form
) and avoid the thing (usually a one liner) being wrapped in a <p />
.
Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern
Offline
Re: Can I escape <p> without Textile?
phiw13 wrote #314540:
The first one, space, I think.
Too late :-) The explanation follows.
I use
notextile.
regularly instead ofspace
because it is much more readable.
They are not equivalent:
notextile. <txp:php>echo "Hello!";</txp:php>
will be rendered as <txp:php>echo "Hello!";</txp:php>
, while
<txp:php>echo "Hello!";</txp:php>
(with a space) produces <txp:php>echo «Hello! »;</txp:php>
. I find the latter rather annoying: you generally must precede <txp:php>
with notextile
, a space wouldn’t suffice.
With the recent change, you don’t need to prepend notextile
anymore, just don’t leave empty lines inside your block. If you want it to be textiled without <p>
-wrapping, just prepend a space, as before.
Offline
Re: Can I escape <p> without Textile?
etc wrote #314541:
With the recent change, you don’t need to prepend
notextile
anymore, just don’t leave empty lines inside your block. If you want it to be textiled without<p>
-wrapping, just prepend a space, as before.
Ok, a bit more restricted than your first patch, but still quite useful. In most of my use cases I won’t need to worry about adding a space.
Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern
Offline
Re: Can I escape <p> without Textile?
phiw13 wrote #314570:
Ok, a bit more restricted than your first patch, but still quite useful.
I find it more useful than before, knowing by experience how easily Textile breaks <txp:php />
, be it wrapped in <p />
or not. But if many of us find it restrictive, it’s just few lines to revert.
Offline