7 replaced http://superuser.com/ with https://superuser.com/
source | link

I've seen too many newbies hit the "quote" button instead of the "code" button while posting. This is much worse than if they just left the code inline, because the quote button rewraps all the text and saves the post with mangled code.

For example, here's some (bad) C++:

class X{};

X& foo() {
    X x;
    return x;
}
int main() {
    X &x = foo();
}

and some quote-mangled C++:

> class X{};
> 
> X& foo() {    X x;    return x; } int main() {    X &x = foo(); }

Once they've saved the post, it is impossible to recover the original formatted code without a substantial amount of effort. One user used it on a stack trace about 100 lines longused it on a stack trace about 100 lines long producing an unreadable mess, not realizing that "quote" was the wrong function for a nicely-formatted stacktrace.

I understand the holdover from email, but it seems unnecessary for StackOverflow to rewrap given that quoted text renders essentially identically to unquoted text (aside from being enclosed in a <blockquote>). It seems to me it would be easier to have the quote button just prefix to each selected line, kind of like how the code button prefixes     , and leave it at that.

So the question is: why does the quote button have to rewrap text when you push the button?


For reference, here's how quoted text appears, first using the quote button and second by manually prefixing :

class X{};

X& foo() { X x; return x; } int main() { X &x = foo(); }

and

class X{};

X& foo() { X x; return x; } int main() { X &x = foo(); }

The appearance is identical, but the latter quote can actually be reversed into proper code later on.

I've seen too many newbies hit the "quote" button instead of the "code" button while posting. This is much worse than if they just left the code inline, because the quote button rewraps all the text and saves the post with mangled code.

For example, here's some (bad) C++:

class X{};

X& foo() {
    X x;
    return x;
}
int main() {
    X &x = foo();
}

and some quote-mangled C++:

> class X{};
> 
> X& foo() {    X x;    return x; } int main() {    X &x = foo(); }

Once they've saved the post, it is impossible to recover the original formatted code without a substantial amount of effort. One user used it on a stack trace about 100 lines long producing an unreadable mess, not realizing that "quote" was the wrong function for a nicely-formatted stacktrace.

I understand the holdover from email, but it seems unnecessary for StackOverflow to rewrap given that quoted text renders essentially identically to unquoted text (aside from being enclosed in a <blockquote>). It seems to me it would be easier to have the quote button just prefix to each selected line, kind of like how the code button prefixes     , and leave it at that.

So the question is: why does the quote button have to rewrap text when you push the button?


For reference, here's how quoted text appears, first using the quote button and second by manually prefixing :

class X{};

X& foo() { X x; return x; } int main() { X &x = foo(); }

and

class X{};

X& foo() { X x; return x; } int main() { X &x = foo(); }

The appearance is identical, but the latter quote can actually be reversed into proper code later on.

I've seen too many newbies hit the "quote" button instead of the "code" button while posting. This is much worse than if they just left the code inline, because the quote button rewraps all the text and saves the post with mangled code.

For example, here's some (bad) C++:

class X{};

X& foo() {
    X x;
    return x;
}
int main() {
    X &x = foo();
}

and some quote-mangled C++:

> class X{};
> 
> X& foo() {    X x;    return x; } int main() {    X &x = foo(); }

Once they've saved the post, it is impossible to recover the original formatted code without a substantial amount of effort. One user used it on a stack trace about 100 lines long producing an unreadable mess, not realizing that "quote" was the wrong function for a nicely-formatted stacktrace.

I understand the holdover from email, but it seems unnecessary for StackOverflow to rewrap given that quoted text renders essentially identically to unquoted text (aside from being enclosed in a <blockquote>). It seems to me it would be easier to have the quote button just prefix to each selected line, kind of like how the code button prefixes     , and leave it at that.

So the question is: why does the quote button have to rewrap text when you push the button?


For reference, here's how quoted text appears, first using the quote button and second by manually prefixing :

class X{};

X& foo() { X x; return x; } int main() { X &x = foo(); }

and

class X{};

X& foo() { X x; return x; } int main() { X &x = foo(); }

The appearance is identical, but the latter quote can actually be reversed into proper code later on.

6 edited tags
| link
5 wording
source | link

I've seen too many newbies hit the "quote" button instead of the "code" button while posting. This is much worse than if they just left the code inline, because the quote button rewraps all the text and saves the post with mangled code.

For example, here's some (bad) C++:

class X{};

X& foo() {
    X x;
    return x;
}
int main() {
    X &x = foo();
}

and some quote-mangled C++:

> class X{};
> 
> X& foo() {    X x;    return x; } int main() {    X &x = foo(); }

Once they've saved the post, it is impossible to recover the original formatted code without a substantial amount of effort. One user used it on a stack trace about 100 lines long producing an unreadable mess, not realizing that "quote" was the wrong function for a nicely-formatted stacktrace.

I understand the holdover from email, but it seems utterly unnecessary for StackOverflow to rewrap given that quoted text renders essentially identically to unquoted text (aside from being enclosed in a <blockquote>). It seems to me it would be easier to have the quote button just prefix to each selected line, kind of like how the code button prefixes     , and leave it at that.

So the question is: why does the quote button have to wraprewrap text when you push the button?


For reference, here's how quoted text appears, first using the quote button and second by manually prefixing :

class X{};

X& foo() { X x; return x; } int main() { X &x = foo(); }

and

class X{};

X& foo() { X x; return x; } int main() { X &x = foo(); }

The appearance is identical, but the latter quote can actually be reversed into proper code later on.

I've seen too many newbies hit the "quote" button instead of the "code" button while posting. This is much worse than if they just left the code inline, because the quote button rewraps all the text and saves the post with mangled code.

For example, here's some (bad) C++:

class X{};

X& foo() {
    X x;
    return x;
}
int main() {
    X &x = foo();
}

and some quote-mangled C++:

> class X{};
> 
> X& foo() {    X x;    return x; } int main() {    X &x = foo(); }

Once they've saved the post, it is impossible to recover the original formatted code without a substantial amount of effort. One user used it on a stack trace about 100 lines long producing an unreadable mess, not realizing that "quote" was the wrong function for a nicely-formatted stacktrace.

I understand the holdover from email, but it seems utterly unnecessary for StackOverflow to rewrap given that quoted text renders essentially identically to unquoted text (aside from being enclosed in a <blockquote>). It seems to me it would be easier to have the quote button just prefix to each selected line, kind of like how the code button prefixes     , and leave it at that.

So the question is: why does the quote button have to wrap text when you push the button?


For reference, here's how quoted text appears, first using the quote button and second by manually prefixing :

class X{};

X& foo() { X x; return x; } int main() { X &x = foo(); }

and

class X{};

X& foo() { X x; return x; } int main() { X &x = foo(); }

The appearance is identical, but the latter quote can actually be reversed into proper code later on.

I've seen too many newbies hit the "quote" button instead of the "code" button while posting. This is much worse than if they just left the code inline, because the quote button rewraps all the text and saves the post with mangled code.

For example, here's some (bad) C++:

class X{};

X& foo() {
    X x;
    return x;
}
int main() {
    X &x = foo();
}

and some quote-mangled C++:

> class X{};
> 
> X& foo() {    X x;    return x; } int main() {    X &x = foo(); }

Once they've saved the post, it is impossible to recover the original formatted code without a substantial amount of effort. One user used it on a stack trace about 100 lines long producing an unreadable mess, not realizing that "quote" was the wrong function for a nicely-formatted stacktrace.

I understand the holdover from email, but it seems unnecessary for StackOverflow to rewrap given that quoted text renders essentially identically to unquoted text (aside from being enclosed in a <blockquote>). It seems to me it would be easier to have the quote button just prefix to each selected line, kind of like how the code button prefixes     , and leave it at that.

So the question is: why does the quote button have to rewrap text when you push the button?


For reference, here's how quoted text appears, first using the quote button and second by manually prefixing :

class X{};

X& foo() { X x; return x; } int main() { X &x = foo(); }

and

class X{};

X& foo() { X x; return x; } int main() { X &x = foo(); }

The appearance is identical, but the latter quote can actually be reversed into proper code later on.

4 gr
source | link
3 added 11 characters in body
source | link
2 added 172 characters in body
source | link
1
source | link