Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Line Breaks <br> inserted after every line
Hey guys, just got installed the other day, and I’m really scratching my head on this one. No matter how I set the Textile preference, line breaks <br> are added to the end of every line. I actually want Textile to be turned off, and to just code the articles by hand. But after every closing tag there’s a break:
...</p><br />
It’s even putting the breaks after heading tags within the body. Any ideas?
All plugins are turned off, and the code validates.
\\//_ Live long and prosper.
Offline
#2 2009-11-29 11:33:27
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: Line Breaks <br> inserted after every line
Which tag are you using for the output, one of these? In some tags the break
attribute has a default value of br
, adding break=""
to your tag should remove the line breaks.
Offline
Re: Line Breaks <br> inserted after every line
Hey Els, thanks for the reply. I’m using <txp:body />. And to get it into the page I’m using <txp:article_custom form=“default” /> replacing default with the name of the form that has only the body tag in it.
Edit: I’ll put in your break suggestion on the page form and try it.
Edit 2: I put in the break=”“ attribute and the breaks are still there.
Last edited by jonlandrum (2009-11-29 14:12:39)
\\//_ Live long and prosper.
Offline
#4 2009-11-29 14:30:58
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: Line Breaks <br> inserted after every line
So even if you set ‘Article markup’ (under Advanced options) to ‘Leave text untouched’ you get those line breaks? Try and re-save the article, the html of the article body is a separate field in the database and it doesn’t get updated unless you save the article after changing the Textile options.
Offline
Re: Line Breaks <br> inserted after every line
I’ve tried re-saving the page after making the switch numerous times. Have changed the text and so forth. I originally had the text marked up with pure HTML including whitespace (tab stops), and tried re-writing it as Textile with the option set as such. No joy on any of the three settings.
The thing is, “convert line breaks” is supposed to put paragraph tags with double-returns, but it was just putting two break tags.
\\//_ Live long and prosper.
Offline
Re: Line Breaks <br> inserted after every line
Do you think clearing the database and reinstalling would benefit? I can’t tell that it’s a theme issue. I turned all plugins off to see if that was the problem, but no change. However, I was getting a database error on the Extensions tab with one plugin, jmd_sitemap.
\\//_ Live long and prosper.
Offline
Re: Line Breaks <br> inserted after every line
Just tried changing that section from the custom page to the default one, and the line breaks are still there.
\\//_ Live long and prosper.
Offline
Re: Line Breaks <br> inserted after every line
Okay, user error. I had an <img> tag in the article; didn’t know you can’t do that.
Thank you for your help, Els. I’ll go read the manual, now.
Edit: for future reference: Article Images in TxP
Last edited by jonlandrum (2009-11-29 21:17:17)
\\//_ Live long and prosper.
Offline
#9 2009-11-29 21:43:08
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: Line Breaks <br> inserted after every line
jonlandrum wrote:
The thing is, “convert line breaks” is supposed to put paragraph tags with double-returns, but it was just putting two break tags.
That’s not correct, it’s supposed to add only <br />
tags for line breaks, not to add <p>
tags.
And you can have an <img>
tag in your article, as well as other XHTML or even Txp tags. Have a look at the Textile Reference Manual XHTML chapter.
Offline
Re: Line Breaks <br> inserted after every line
Really? So it was doing what it’s supposed to do, then.
Upon further reading, I found that each article can have its own markup setting. Guess how it was set for that article? So no matter how many times I changed it in the Preferences tab, this one article was still set to convert line breaks only.
Forgive me; I am migrating from WordPress, so it may take me some time to figure out how things work in Textpattern.
\\//_ Live long and prosper.
Offline
Re: Line Breaks <br> inserted after every line
Els wrote:
So even if you set ‘Article markup’ (under Advanced options) to ‘Leave text untouched’ you get those line breaks? Try and re-save the article, the html of the article body is a separate field in the database and it doesn’t get updated unless you save the article after changing the Textile options.
And upon reading this, I realise you were referring to the Advanced options on the Write tab, not on the Preferences tab. My bad.
\\//_ Live long and prosper.
Offline
#12 2009-11-29 23:18:31
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: Line Breaks <br> inserted after every line
jonlandrum wrote:
So no matter how many times I changed it in the Preferences tab, this one article was still set to convert line breaks only.
Ah, I assumed you were referring to the Advanced options setting (per article), not the Preferences setting…
(edit: I notice I overlooked your last post…)
it may take me some time to figure out how things work in Textpattern.
That’s how it works for everyone ;) Just post your questions on the forum, there is always someone who can help you :)
Oh and welcome to Txp!
Last edited by els (2009-11-29 23:19:35)
Offline