Closed
Bug 87102
Opened 24 years ago
Closed 23 years ago
Source formatting: newlines outside body are not retained
Categories
(Core :: DOM: Serializers, defect, P4)
Tracking
()
Future
People
(Reporter: apa3a, Assigned: harishd)
References
Details
(Whiteboard: [output])
Attachments
(2 files)
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.1+) Gecko/20010620
BuildID: 2001062021
I have option "When saving files" set to "Retain original source formatting",
but composer changes html formatting, especially in the beginning and in the end
of the file.
Reproducible: Always
Steps to Reproduce:
1. Open with Composer the attached file "original.html"
2. Save this file as "edited.html"
Actual Results: After step 3 the formatting in file "edited.html" differs from
"original .html"
Expected Results: The files should be identical.
Reporter | ||
Comment 1•24 years ago
|
||
Reporter | ||
Comment 2•24 years ago
|
||
Comment 3•24 years ago
|
||
assign to akkana for debug
Assignee: beppe → akkana
Severity: normal → minor
Keywords: correctness
Priority: -- → P4
Whiteboard: [output]
Target Milestone: --- → Future
Updated•24 years ago
|
Status: UNCONFIRMED → NEW
Ever confirmed: true
Comment 4•24 years ago
|
||
Accepting. When the pref was first put in, it was put in backward (so if you
wanted to retain source formatting, you had to tell it NOT to). Charley said he
was going to fix this but I haven't checked recently to see if it ever happened.
Even with formatting, there will be some differences (e.g. gecko gives us no way
to preserve formatting of attributes inside tags), but at least we want to make
it possible to retain as much as possible.
Status: NEW → ASSIGNED
Reporter | ||
Comment 5•24 years ago
|
||
Akkana, the preferences dialog works correctly now (Linux 2001062021).
Composer does try to save formatting when you tell it to. The issue - it does
not preserve all the formatting.
Comment 6•24 years ago
|
||
Apparently the prefs dialog is still backward; anthonyd has a bug on that.
But aside from that, the problems I see with the formatting here are that
newlines outside the body node are not preserved. We've had a lot of problems
with the parser not passing us newlines outside the body (e.g. bug 17017, bug
24275) but I can't seem to find an open bug currently covering this issueso I'll
keep the bug until I have a chance to verify whether the problem is happening at
the parser level or in the serializer. There also used to be a workaround in
the serializer which turned on prettyprinting outside the body (regardless of
the preference) since the newlines were getting dropped, and that code may have
gotten deleted in the sink stream to serializer switch and may need to be
resurrected.
Changing summary to be clearer about what the actual problem is, and adding
Harish (in case he knows whether this is still an issue in the parser) and
Anthonyd (who owns serializers and has the bug on the pref being reversed).
Summary: Original source formatting is not retained → Source formatting: newlines outside body are not retained
Comment 7•23 years ago
|
||
This is a serializer/parser issue, not editor.
Assignee: akkana → peterv
Status: ASSIGNED → NEW
Component: Editor → DOM to Text Conversion
Comment 8•23 years ago
|
||
I'm suspecting the parser (from tracking in the content sink). Harish, how do I
dump the content model?
javascript:"alert(document.body.innerHTML);" should give an idea of the content
model.
Comment 10•23 years ago
|
||
Looks like parser problem. Dump content displays the messed up new lines.
-->harish
Assignee: peterv → harishd
Comment 11•23 years ago
|
||
*** Bug 95129 has been marked as a duplicate of this bug. ***
Comment 12•23 years ago
|
||
*** This bug has been marked as a duplicate of 25141 ***
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•