line breaks get lost in preview



4 years ago
4 years ago


(Reporter: simon, Unassigned)



(Whiteboard: [specification][type:bug])


(1 attachment)



4 years ago
What did you do?
When I edit code in a page on MDN (e.g. within <pre>) all my line endings get lost in the preview. I'm on windows, I guess it has to do with my line endings?

What happened?
Line endings get lost in the preview

What should have happened?
line breaks within code section (<pre>

Is there anything else we should know?
I'm using FF on Windows.

This is strange. I can't reproduce it for the moment. Can you give us more information about the steps you performed to hit this problem?

Did you copied from an external editor or was it using the internal editor?

Also do you have a MDN page where it happened so that we can look at what is stored for it?

Thank you!
Flags: needinfo?(simon)

Comment 2

4 years ago
It happened when I was editing the code example on First I was just using the internal editor and at first the line endings were fine. But as soon as I switched to the preview they got lost. Then I tried two different external editors (phpStorm, notepad++), one of them helped, the other made it worse even though I tried unix style and windows style line endings.
Flags: needinfo?(simon)
Oh yes, you are right. I was able to reproduce it.

The key point here is that the problem appears in preview mode only, not the final generated page.

Needinfo Māris so that he can finish the triage.
Flags: needinfo?(mars)
Created attachment 8536001 [details]
Screen Shot 2014-12-13 at 11.34.25.png

"var call" is on the same line as the html tags, which is not the case in the example (and in the regenerated page, without a change)

(Note: I'm using a Mac).


4 years ago
Severity: normal → minor
Component: General → Editing
Ever confirmed: true
Flags: needinfo?(mars)
You need to log in before you can comment on or make changes to this bug.