Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2005-09-25 11:52:21

zyf
Member
From: Harbin, China
Registered: 2005-05-10
Posts: 20
Website

how to prevent textile in <pre>

TXP ver 4.0.1.

I need to write some Python code in article, so I use “pre” and “code” to enclose the following code, but “__” is convert to “i” in textile. How can I prevent this?

<pre>
<code>
class window(wx.Panel): def __init__(self, parent): wx.Panel.__init__(self, parent, -1)

</code>
</pre>

oh, It seems work fine in this forum with “pre” and “code”.

Last edited by zyf (2005-09-25 11:54:18)

Offline

#2 2005-11-02 09:41:05

adamhf
New Member
From: London
Registered: 2005-10-24
Posts: 2
Website

Re: how to prevent textile in <pre>

Think this may help…

I was having this problem for quite some time, then I found this – seems to work.

Extra spaces in tags to display example here.

< notextile >
< pre >
< code >

< /code >
< /pre >
< /notextile >


[url=http://www.adamfellowes.com/]Adam Fellowes – web design and development[/url]

Offline

#3 2005-11-05 07:55:14

zyf
Member
From: Harbin, China
Registered: 2005-05-10
Posts: 20
Website

Re: how to prevent textile in <pre>

adamhf, your code doesn’t work for me. then I adjust the postion of “notextile” as follows, and it works ok now. thank you.

< pre>
< code>
< notextile >

< /notextile >
< /code >
< /pre >

Offline

#4 2006-02-06 13:54:38

apo
Member
From: Germany
Registered: 2004-10-27
Posts: 53

Re: how to prevent textile in <pre>

hmmm… got the same problem and both solutions dont work. it always puts me an extra paragraph within the code, always beginning after the second line. does textile have problems with pasted code, maybe because of the EOL-escapes or something?

Offline

#5 2006-08-01 00:44:10

jm
Plugin Author
From: Missoula, MT
Registered: 2005-11-27
Posts: 1,746
Website

Re: how to prevent textile in <pre>

I still can’t get textile to recognize tabs, using both of the above methods. On this forum, just using a pre tag works, but it doesn’t work the same in Textpattern. Could the same version/revision of Textile be used in the next TXP release?

Offline

Board footer

Powered by FluxBB