- ([personal profile] rho) wrote in [site community profile] dw_suggestions2009-11-24 05:30 am

Trim extraneous whitespace when auto-quoting in comments

Title:
Trim extraneous whitespace when auto-quoting in comments

Area:
Comments

Summary:
When you use the auto-quote button on comments, if there is any leading or trailing whitespace, it should be automatically removed.

Description:
When selecting the text to quote, it's often difficult or impossible to tell for sure whether you have any extraneous whitespace selected. For instance, I often find I have an extra space character selected at the end of the sentence that I didn't want to select. Even worse is when you accidentally select a leading or trailing line break meaning that you get a <blockquote> style quote rather than a <q> style quote.

What I'm proposing is that the selected text should be stripped of leading and trailing whitespace (spaces, newlines and tabs) before it is quoted and before the code determines whether it should be using <q> or <blockquote>.

The only drawback I can think of for this is if people actively want to quote trailing spaces or leading line breaks but I honestly can't think of any reason anyone would actually want to do this. Whcih probably means there are thousands of people out there about to tell me how wrong I am.

Poll #1765 Trim extraneous whitespace when auto-quoting in comments
Open to: Registered Users, detailed results viewable to: All, participants: 27


This suggestion:

View Answers

Should be implemented as-is.
20 (74.1%)

Should be implemented with changes. (please comment)
0 (0.0%)

Shouldn't be implemented.
1 (3.7%)

(I have no opinion)
5 (18.5%)

(Other: please comment)
1 (3.7%)

jeeps: (Default)

[personal profile] jeeps 2009-11-24 06:12 am (UTC)(link)
i haven't quite figured out why it switches to <blockquote> instead of <q> when you highlight more than you meant to in the first place.
jeeps: (Default)

[personal profile] jeeps 2009-11-24 06:24 am (UTC)(link)
i see. your suggestion seems like an even better idea in that case.
triadruid: Apollo and the Raven, c. 480 BC , Pistoxenus Painter  (Default)

[personal profile] triadruid 2009-11-24 04:29 pm (UTC)(link)
Maybe I never quote single lines, but I've never noticed this to be helpful behavior AT ALL. For one thing, there's no default styling AFAIK on q/q, so it doesn't look like it really worked. It seems like this is being clever for clever's sake, and not leaving it up to the user.

At the least, the difference should be explained a lot better in the FAQ/tooltip.
triadruid: Apollo and the Raven, c. 480 BC , Pistoxenus Painter  (Default)

[personal profile] triadruid 2009-11-24 04:31 pm (UTC)(link)
Addendum, to get in at the head of the line of people telling you how wrong you are :)

If I quote more than a 'line' of text (meaning there's a formatting carriage return), I want the system to use blockquote. I tend to sue an email-style reply, which means quote block, commentary, quoteblock, commentary. If I'm just quoting a few words of what you said, I'll highlight and drag it, or just retype it.
kyrielle: Middle-aged woman in profile, black and white, looking left, with a scarf around her neck and a white background (Default)

[personal profile] kyrielle 2009-11-25 03:49 am (UTC)(link)
Which is interesting, 'cause I just replied to one of my own entries and quoted a bit to test, and it was displayed the same way it is on LJ and everywhere else - plain text, indistinguishable. But where you link it does italicize, I see. If I have a q tag inline with text not in the q tag, how does that indent work?

I have never understood why LJ (and now DW, by derivation) insisted on using a tag that has no styling (unless imposed by the site) to show you it is even freaking THERE. I know IE is a pain in the rear, but it is a COMMON pain in the rear...and the quotes look really dumb and indistinguishable in it.

Hmm. Just tried it for all my browsers on my journal / in its style. In IE, it's completely unstyled as if the tags weren't there. In Chrome, it's the same except there are double-quotes at either end of it (pretty sucky if what you quoted had double-quotes in it, IMO). Firefox does the same as Chrome. (ETA: So does the Safari browser on my iPhone.) None have italics, which would, you know, actually draw the eye and be logical.

Still hate the <q> tag. Still wish it were never ever used.
Edited 2009-11-25 03:57 (UTC)
triadruid: Apollo and the Raven, c. 480 BC , Pistoxenus Painter  (Default)

[personal profile] triadruid 2009-11-25 04:03 pm (UTC)(link)
Thank you; I thought I was crazy for never seeing any default styling.