Improve XHTML formatting
Posted: 17 June 2007 02:58 AM   [ Ignore ]  
Moderator
Avatar
RankRankRankRankRankRankRank
Total Posts:  29225
Joined  05-15-2004

We all know and, presumably, love the way “Formatting: XHTML” handles our weblog entries. Still, I’d think there was room for some improvement, because in a number of cases blindly replacing every linebreak with
and every double line break with ...  is not necessarily the most elegant solution.

I’d go as far as saying that in the cases of <table>, <ul>, <ol>, <dl> and probably a few others this behavior is definitely unwanted by most people, even though the rest of the entry could profit from normal formatting: this is why neither choosing “Formatting: None” nor “keeping your table on a single line” are really satisfying solutions, all things considered.

I know, of course, that all that XHTML and typography parsing is a difficult issue, so we won’t get it for 1.6, I’m sure. Still, I think this FR might prove somewhat popular, and I wanted to make it. Thanks for considering.

 Signature 

ExpressionEngine 2.0 Downloads | Docs | Bugtracker

“If the English language made any sense, lackadaisical would have something to do with a shortage of flowers.” (Doug Larson)

Profile
MSG
 
 
Posted: 17 June 2007 07:42 AM   [ Ignore ]   [ # 1 ]  
Administrator
Avatar
RankRankRankRankRankRankRank
Total Posts:  19293
Joined  06-03-2002

Most of these tags already have the “blind inserted”  and
tags removed from them—you do not have to always keep the markup on a single line.  Tables being an exception, we currently have no special handling for table tags within Auto-XHTML fields.  But typically only when you begin more complex nesting of these other tags does the current parser not handle these situations.

That said, overall, yes, typography will likely be getting some major enhancement in 2.0.

 Signature 
Profile
MSG
 
 
Posted: 10 July 2007 03:12 AM   [ Ignore ]   [ # 2 ]  
Research Assistant
RankRankRank
Total Posts:  304
Joined  06-18-2007

Hi

I believe the best feature of Auto XTHML is its automatic handling of “fancy quotes” etc. That’s the only reason I use it. However, its dodgy behaviour with ul,li,table etc is irritating. I think the engine should just switch off when it sees any <div>, <ul> <ol> or <table> tag and switch on again after it.

Clealy the person using those tags knows HTML and wants to do manual coding within those tags.

Profile
 
 
Posted: 10 July 2007 07:15 AM   [ Ignore ]   [ # 3 ]  
Administrator
Avatar
RankRankRankRankRankRankRank
Total Posts:  19293
Joined  06-03-2002

So what about this, Richard?

<ol>
    <
li>Turn left on Foo Avenue</li>
    <
li>Turn Right on Bar Avenue.
        (
After 4pm, you will need to turn Left on Bar)
    </
li>
    <
li>Arrive at destination.</li>
</
ol>

Is it not reasonable to expect that the user will want a
after “Bar Avenue.”, but not want one after “on Bar)”?  Parsing text unfortunately is not such a straightforward matter of “switching off” when encountering tags.

Clealy the person using those tags knows HTML and wants to do manual coding within those tags.

The only time it is honestly safe to make that assumption is with a formatting type of “None”.  However, if you find yourself only using XHTML typography for quote handling, can I recommend that instead of Auto XHTML typography that you use the XHTML Typography plugin, with the “light” setting?  I think you’ll end up with precisely what you are looking for.

 Signature 
Profile
MSG
 
 
Posted: 15 July 2007 12:46 PM   [ Ignore ]   [ # 4 ]  
Research Assistant
RankRankRank
Total Posts:  304
Joined  06-18-2007

Thanks for the points; the plugin will help!

Profile
 
 
   
 
 
Post Marker Legend
New Topic New posts Hot Topic Hot Topic with new posts New Poll New Poll Moved Topic Moved Topic Sticky Topic Sticky topic
Old Topic No new posts Hot Old Topic Hot Topic with no new posts Old Poll Old Poll Closed Topic Closed Topic Announcement Announcements
Theme
Change Theme
Visitor Statistics
The most visitors ever was 1743, on December 02, 2009 03:47 PM
Total Registered Members: 120561 Total Logged-in Users: 65
Total Topics: 126605 Total Anonymous Users: 29
Total Replies: 665583 Total Guests: 325
Total Posts: 792188    
Members ( View Memberlist )