Whenever I use the question/answer editor's link button, to insert a link, the link gets inserted correctly, but then each line-break is doubled (which means I now have three line-breaks between paragraphs, and single line breaks get empty lines = paragraph breaks.)

Repeating this doubles the line-breaks again, now I have seven empty lines between paragraphs. As an example, here is a screenshot from the editor of a question on the new crypto StackExchange (still in private beta), after inserting three inline links:

screenshot - many empty lines

Actually, the same thing occurs after inserting an image (look at the source code of this question to see a single example).

This is happening since a day or two (I'm not quite sure), in Opera 11.50 on Ubuntu 11.04. (It does not happen in Firefox 5.0 on the same system.)

  • It does seem to be Opera-specific; reproduced.
    – Tim Stone
    Commented Jul 17, 2011 at 1:21
  • I've never had this happen and it doesn't appear to be reproducible to me on Chrome or Firefox. I don't have Opera installed, though. All of you Opera troublemakers... :-) Commented Jul 17, 2011 at 4:38

1 Answer 1


This is :

if (uaSniffed.isOpera) {
    chunk.before = chunk.before.replace(/\n/g, "\r\n");
    chunk.selection = chunk.selection.replace(/\n/g, "\r\n");
    chunk.after = chunk.after.replace(/\n/g, "\r\n");

– but I'm inclined to question this design :)

There's no explanatory comment around this piece of code (which, except for changed variable names, has always been in the editor JavaScript); I'll assume that this was working around an Opera issue that has since been fixed, and thus this special handling can be dropped now.

  • Could be that this got superfluous (or at least, damaging) with Opera 11.50. So maybe a version toggle? (Or we simply wait if now someone with an earlier Opera version complains, to see for what it was good.) Commented Jul 17, 2011 at 10:40

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .