Turn off automatic line-breaks around certain HTML tags
Title:
Turn off automatic line-breaks around certain HTML tags
Area:
html, markup, entry editor
Summary:
The autoformatter adds line breaks immediately before and after tags like <ul>, resulting in either writing HTML code all squished into one line, or a huge number of line breaks being added. I suggest this whitespace be stripped.
Description:
Say I have auto-formatting on, and I code up a list like this:
"""
Here is my intro to the list:
<ul>
<li>Here is my first list item</li>
<li>Here is my second list item</li>
</ul>
Here is my continuing text.
"""
This comes out of rendering something like:
"""
Here is my intro to the list:
* Here is my first list item
* Here is my second list item
Here is my continuing text.
"""
That is, there are two or three blank lines around the list, especially immediately after it, and blank lines between list items too. I never want this, I'm putting the line breaks in so that I can read my own HTML code. I have to avoid it by doing something like:
<blockquote>
Here is my intro to the list:<ul><li>Here is my first list item</li><li>Here is my second list item</li></ul>Here is my continuing text.
</blockquote>
This is very hard to read over when reviewing or re-editing my entry.
I would prefer the more standard HTML rendering of:
<blockquote>
Here is my intro to the list:
* Here is my first list item
* Here is my second list item
Here is my continuing text
</blockquote>
This is *not* the same as http://dw-suggestions.dreamwidth.org/92411.html, which wants auto-formatting off within certain tags. I want it off *around* certain tags: if I put a line break right after a <ul> tag, I *don't* want a line break there, I just want to be able to read my own HTML.
The WordPress HTML editor has exactly the behaviour I like here.
This suggestion:
Should be implemented as-is.
36 (56.2%)
Should be implemented with changes. (please comment)
6 (9.4%)
Shouldn't be implemented.
7 (10.9%)
(I have no opinion)
13 (20.3%)
(Other: please comment)
2 (3.1%)

no subject
no subject
no subject
It puts a break either before or after <hr> as well, and I can never remember which, so I have to remember to check it in Preview and change it.
no subject
I'm not dead set against this but I think it's an idea that might make things confusing for users who don't understand, or have a limited understanding of HTML.
no subject
I speak from experience; I now expect to have to open the "preview" window several times for a complex post, to figure out where I've accidentally left in a return before a tag that shouldn't have one.
no subject
If, for readibility purpose (for example), a linebreak happens after (or before) a block-type elements (like divs, blockquotes or list elements), it does double duty with the clearing that occurs automatically due to the nature of the tag, both before and after (unless said tag's behaviour has been changed by CSS but that's another matter). And that's what make it appears as though there is an extra linebreak. It's because you actually intentionally put it there, and then asked the dw code processing your post to convert it to an actual linebreak.
If you break this pattern of behaviour, it WILL confuse part of the users, regardless of your own situation, it just won't be the same subset. I'm not really sure it's a desirable side effect of this modification.
no subject
Right now the behavior is a little annoying, but totally predictable. I don't have to remember, "oh, no automatic line break after a list item" if I want my list double-spaced, for example.
no subject
But in any case, that's exactly the point I was aiming to make. If the auto-linebreaking rules are changed, especially only a small subset of tags, it will cause confusion for the subset of user who are used to and expect this behaviour to occur. A behaviour which is as you point it, perfectly predictable, as well as logical.
no subject
Predictability and logic is good, though. Would this make sufficient sense: make no change to how line-breaks around inline-level tags are treated; but strip line-breaks from around all block-level tags?
(For me, this seems ultimately little different than stripping my habitual double-spacing between sentences down to a single space. I can force the second space if I really want, but mostly I don't.)
no subject
Auto-formatting should not add <br>/<p> tags immediately after a block-level element.
no subject
no subject
no subject
no subject
no subject
I like that I can hit return and get a linebreak, and wouldn't want to change that.
I dislike that if I use proper code for content, like headers, blockquotes and list items, that it adds in extra linebreaks I didn't ask for nor need.
I didn't actually realise it was doing this for awhile, and when teaching a friend how to format posts better got very confused when he had big problems getting it to look right.
no subject
I want my posts and comments to be auto formatted. I don't want them to be raw; I want linebreaks to be inserted. But not at the end of list elements!
no subject
no subject
(Most of my lists and blockquotes lately have had cuts in among them, which causes other bugs that I really should get around to reporting already.)
no subject
no subject
no subject
no subject
no subject
And here I always thought this was just an artifact of HTML parsing. Man, it'd be great if those extra spaces weren't there. I hate having to put everything all on one long line.
no subject
no subject
no subject
no subject
I just want my lists to work!!!