Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2010-12-03 18:03:36
- progo
- Member
- Registered: 2009-12-11
- Posts: 11
[textile] Extra <br>s in the PRE output; not shown in HTML preview
I customized Textile’s bc
block a little and now I find odd things there: everything parses as it should do:
bc
wraps inpre
but no longer incode
- in preview and HTML view it looks as it should be
- but in the real output
<br>
s are inserted everywhere where a plain\n
should occur!
I’m not saying that my editings of the Textile engine wouldn’t cause this, but something in the engine adds unnecessary line breaks. My article pages use Oops, that was a false statement! (Actually, after spending good 20 minutes in my messy tag salad, I’m not sure where my articles get displayed.) <txp:body />
without any breaktags.rss_auto_excerpt
may have something to do with this, but I think I tried displaying an article without it. Sorry, I never got hang of the system really. I just tweak and use this :)
edit #2: it was really <txp:body />
! It’s been so long since last time I edited this.
Only pre
wrapped blocks get <br>
’d!
Thanks for advice
Last edited by progo (2010-12-03 18:55:37)
Offline
#2 2010-12-03 20:41:32
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: [textile] Extra <br>s in the PRE output; not shown in HTML preview
progo wrote:
I customized Textile’s
bc
block a little and now I find odd things there
Sorry, I never got hang of the system really. I just tweak and use this :)
And you are expecting support? ;)
Sorry, but if we don’t even know what modifications you made, it’s hard to help… It might be better if you change back to the original Textile and tell us what you’d like it to do?
BTW What are your settings for Textile in the Write tab? (Advanced options)
Last edited by els (2010-12-03 20:42:23)
Offline
Re: [textile] Extra <br>s in the PRE output; not shown in HTML preview
Looking at your “edit #2”, can we conclude that the problem is already solved? ;)
[+what Els said]
Last edited by ruud (2010-12-03 20:42:35)
Offline
#4 2010-12-03 23:01:02
- progo
- Member
- Registered: 2009-12-11
- Posts: 11
Re: [textile] Extra <br>s in the PRE output; not shown in HTML preview
Els wrote:
And you are expecting support? ;)
Sorry, but if we don’t even know what modifications you made, it’s hard to help… It might be better if you change back to the original Textile and tell us what you’d like it to do?
BTW What are your settings for Textile in the Write tab? (Advanced options)
Heh :) Naw, I just hoped that since everything looks okay in rendered XHTML the modification wouldn’t be the issue. Might as well file a feature request at later time. I always use the Use Textile option, which is also the site-wide default.
Anyhow, this piece of textile
bc. is this
alright
this time?
turns into
<pre><txp:fox_code>is this
alright
this time?</txp:fox_code></pre>
In the HTML preview. But in real system, being filtered by forms and pages, it becomes:
<pre><div class="php codeblock">is this<br>
alright<br>
this <span class="kw3">time</span>?</div></pre>
</div>
I’ve double-triple-checked the PHP. Shouldn’t be extra <br>
from there! Moreover, if I insert a mindless str_replace
to remove any line breaks, the result comes <br />
’s! Being pre
, the lines are double spaced. I understand it’s not anyones but my job to watch out the side effects of some hacks so unless it’s clear what happens there I’ll file a FR. Thanks :)
Edit: everything seems okay now. You (and me?) were right, this shouldn’t have belong here.
Epilogue: If you want to have syntax-highlighting like me, I think your best shot is to use a JS based solution. This way you can have ordinary pre.
or bc.
blocks with easy language definition, by writing a class section such as pre(js).
to write a javascript-highlit code. This didn’t across my mind until I stumbled into SyntaxHighlighter. Even though I strongly dislike JS, it works all better until someone realizes my not so humble suggestion in the other thread :)
Last edited by progo (2010-12-08 13:43:20)
Offline