Textpattern CMS support forum

You are not logged in. Register | Login | Help

#31 2018-10-10 16:49:32

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 3,390
Website

Re: Can I escape <p> without Textile?

etc wrote #314502:

I think that is <p><figure> … </figure></p>, but, since it is invalid (p accepts only phrasing content), browsers transform it into

<p></p><figure> … </figure><p></p>...

You could be right there. I didn’t know that. If that happens in the browser and not during markup output by the CMS, the replace methods I noted above won’t work, I guess.


TXP Builders – finely-crafted code, design and txp

Offline

#32 2018-10-10 18:18:03

RedFox
Member
From: Netherlands
Registered: 2005-03-25
Posts: 734
Website

Re: Can I escape <p> without Textile?

jakob wrote #314519:

… the replace methods I noted above won’t work, I guess.

That’s right … they don’t. I’ve tried them all.

Offline

#33 2018-10-10 18:21:10

RedFox
Member
From: Netherlands
Registered: 2005-03-25
Posts: 734
Website

Re: Can I escape <p> without Textile?

Destry wrote #314513:

Yes, can we please just write on the left edge of the box without the workarounds. I mean, I’m sure there have been reasons to not touch Textile before, but if we have since evolved to a higher plane of existence/capability, let’s make it so.

+1

Offline

#34 2018-10-10 18:34:39

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 3,390
Website

Re: Can I escape <p> without Textile?

RedFox wrote #314522:

That’s right … they don’t. I’ve tried them all.

All? If it always happens around a figure, maybe this one would work on the cms output:

<txp:smd_wrap_all transform="replace|regex|#(<p>)?(<\/?figure>)(</p>)?#|$2"> … </txp:smd_wrap_all>

Perhaps… 🤔


TXP Builders – finely-crafted code, design and txp

Offline

#35 2018-10-11 07:52:50

etc
Developer
Registered: 2010-11-11
Posts: 3,127
Website

Re: Can I escape <p> without Textile?

Destry wrote #314513:

Yes, can we please just write on the left edge of the box without the workarounds.

Done in 4.7.2 txp Textile, soon on Pete’s demo site, please test.


etc_[ query | search | pagination | date | tree | cache ]

Offline

#36 2018-10-11 08:00:51

RedFox
Member
From: Netherlands
Registered: 2005-03-25
Posts: 734
Website

Re: Can I escape <p> without Textile?

jakob wrote #314524:

… maybe this one would work on the cms output:

It doesn’t … :o

Offline

#37 2018-10-11 08:02:49

RedFox
Member
From: Netherlands
Registered: 2005-03-25
Posts: 734
Website

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.

🙏

Offline

#38 2018-10-11 08:38:41

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 3,390
Website

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

#39 2018-10-11 08:54:38

phiw13
Plugin Author
From: Japan
Registered: 2004-02-27
Posts: 1,625
Website

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.

Offline

#40 2018-10-11 09:54:38

etc
Developer
Registered: 2010-11-11
Posts: 3,127
Website

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)


etc_[ query | search | pagination | date | tree | cache ]

Offline

Board footer

Powered by FluxBB