Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#13 2019-08-27 01:13:16

Kjeld
Member
From: Tokyo, Japan
Registered: 2005-02-05
Posts: 446
Website

Re: Textile does not output

jakob wrote #319146:

There has, I believe, been a more recent change where it’s no longer necessary to put a space at the beginning of the line to disable textile if a line begins with a tag bracket. That use case should now work without the extra space. I think this was to make it easier to use txp::shortcodes in the body field.

Otherwise the preceding space acts like notextile.{space}.

However, you always did need a blank line to prompt a new <p> tag between paragraphs; a regular line-break produces just a br tag.

Thanks, Jakob.

But is it expected behavior that no html is added at all (to the full text) when I add raw html without the space?

This is the behavior that I am experiencing.

When I input this in Body:

Tokkotai (suicide squad or _kamikaze_) pilot during WWII, photographed in Tottori in July 1945.
<br /><br />
IMPORTANT
Maximum file size: 18.1M (3008 x 1970 pixels @ 300dpi)

it outputs this (no html and Textile is ignored):

Tokkotai (suicide squad or _kamikaze_) pilot during WWII, photographed in Tottori in July 1945.
<br />
<br />

IMPORTANT
Maximum file size: 18.1M (3008 x 1970 pixels @ 300dpi)

But when I input this in Body (notice the space in front of <br /><br />):

Tokkotai (suicide squad or _kamikaze_) pilot during WWII, photographed in Tottori in July 1945.
 <br /><br />
IMPORTANT
Maximum file size: 18.1M (3008 x 1970 pixels @ 300dpi)

it outputs this (html for all text, and Textile is applied):

<p>Tokkotai (suicide squad or <em>kamikaze</em>) pilot during <span class="caps">WWII</span>, photographed in Tottori in July 1945.
 <br />
<br />
<span class="caps">IMPORTANT</span><br />
Maximum file size: 18.1M (3008 &#215; 1970 pixels @ 300dpi)</p>

Is this the way it should be working?
(It is not how it works on textile-lang.com.)

Last edited by Kjeld (2019-08-27 01:13:45)


Old Photos of Japan – Japan in the 1850s~1960s (100% txp)
MeijiShowa – Stock photos of Japan in the 1850s~1960s (100% txp)
JapaneseStreets.com – Japanese street fashion (mostly txp)

Offline

#14 2019-08-27 06:47:47

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,578
Website

Re: Textile does not output

But is it expected behavior that no html is added at all (to the full text) when I add raw html without the space?

Oh, you’re right! 😳 Apologies for misunderstanding above.

If I paste your first example into textile-lang.com, none of the textile notation is processed. As soon as I add a space or a return before <br />, the textile notation is processed. I think you may have discovered a bug or “unintended side effect”.

BTW: The reason previously input Textile still works fine is because textile is processed when you save the article and the resulting html is stored in the database for displaying on your page, reducing processing load on the server and improving speed. That remains unaffected until the next time you save or edit the article. Should you ever want to re-process old articles, there’s the plugin sed_textile_upgrade by netcarver that refreshes the textile output for all articles.


TXP Builders – finely-crafted code, design and txp

Offline

#15 2019-08-27 08:04:51

Kjeld
Member
From: Tokyo, Japan
Registered: 2005-02-05
Posts: 446
Website

Re: Textile does not output

jakob wrote #319156:

Oh, you’re right! 😳 Apologies for misunderstanding above.

If I paste your first example into textile-lang.com, none of the textile notation is processed. As soon as I add a space or a return before <br />, the textile notation is processed. I think you may have discovered a bug or “unintended side effect”.

BTW: The reason previously input Textile still works fine is because textile is processed when you save the article and the resulting html is stored in the database for displaying on your page, reducing processing load on the server and improving speed. That remains unaffected until the next time you save or edit the article. Should you ever want to re-process old articles, there’s the plugin sed_textile_upgrade by netcarver that refreshes the textile output for all articles.

Good to know that it was not something caused by my coding. Although you might not be too happy about this unintended side effect 😉

sed_textile_upgrade is a very helpful tip and will save me a lot of time! Thanks.


Old Photos of Japan – Japan in the 1850s~1960s (100% txp)
MeijiShowa – Stock photos of Japan in the 1850s~1960s (100% txp)
JapaneseStreets.com – Japanese street fashion (mostly txp)

Offline

#16 2019-08-30 18:48:13

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: Textile does not output

This has been fixed by PHP-Textile 3.7.3.

Offline

#17 2019-08-30 19:05:03

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,007
Website GitHub Mastodon Twitter

Re: Textile does not output

Gocom wrote #319197:

This has been fixed by PHP-Textile 3.7.3.

A wonderfully minor, but very functional, improvement. Thanks Jukka!!!


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#18 2019-08-31 02:32:21

Kjeld
Member
From: Tokyo, Japan
Registered: 2005-02-05
Posts: 446
Website

Re: Textile does not output

Gocom wrote #319197:

This has been fixed by PHP-Textile 3.7.3.

Wonderful. Thank you!


Old Photos of Japan – Japan in the 1850s~1960s (100% txp)
MeijiShowa – Stock photos of Japan in the 1850s~1960s (100% txp)
JapaneseStreets.com – Japanese street fashion (mostly txp)

Offline

Board footer

Powered by FluxBB