Closed
Bug 1070502
Opened 10 years ago
Closed 10 years ago
Composer inserts multiple empty lines into document's source code
Categories
(SeaMonkey :: Composer, defect)
Tracking
(Not tracked)
People
(Reporter: Dmitry.Semionin, Unassigned)
Details
Attachments
(1 file)
(deleted),
text/html
|
Details |
User Agent: Mozilla/5.0 (Windows NT 6.0; WOW64; rv:32.0) Gecko/20100101 Firefox/32.0
Build ID: 20140917194002
Steps to reproduce:
I'm creating a document with Composer which has a lot of inner hyperlinks, i.e. i create a named anchors and then link to them from various places in text.
Actual results:
What i noticed is that in the document's source code there are a lot of empty line spans, mostly following the pattern like in the example below:
<i><a
href="#%D0%9E%D0%BF%D1%80%D0%B5%D0%B4%D0%B5%D0%BB%D0%B5%D0%BD%D0%B8%D0%B5%D0%96%D1%91%D1%81%D1%82%D0%BA%D0%B8%D0%B9%D0%94%D0%B8%D1%81%D0%BA">жёсткий
... lots of empty lines ...
диск</a></i>
This typically happens when the text is wrap in <i><a> consists of more than a single word. Yet there are cases like
<p>Неказисто звучащим по-русски словом "<b><a
href="https://ru.wikipedia.org/wiki/%D0%93%D0%B8%D0%B1%D0%B5%D1%80%D0%BD%D0%B0%D1%86%D0%B8%D1%8F_%28%D0%BE%D0%BF%D0%B5%D1%80%D0%B0%D1%86%D0%B8%D0%BE%D0%BD%D0%BD%D1%8B%D0%B5_%D1%81%D0%B8%D1%81%D1%82%D0%B5%D0%BC%D1%8B%29">гибернация</a></b>",
... many empty lines ...
<the paragraph text continues>
that don't follow that pattern. Also, there are moments like
<i><a
href="#%D0%9E%D0%BF%D1%80%D0%B5%D0%B4%D0%B5%D0%BB%D0%B5%D0%BD%D0%B8%D0%B5%D0%96%D1%91%D1%81%D1%82%D0%BA%D0%B8%D0%B9%D0%94%D0%B8%D1%81%D0%BA">
жёсткий диск</a></i>
that show that not all the multiword text wrapped in <i><a>'s causes the empty line insertion. However, the last case shows that all the words of the text were formatted to stay on the same line, maybe that's the cause the empty lines weren't inserted?
The empty lines could also be produced by the constructs like
<p><b><a name="РежимыФункционированияВыключенноеСостояние"></a>Выключенное
... many empty lines ...
состояние</b></p>
The interesting fact is that the number of empty lines varies between the cases, from as little as 6 lines to as many as 80. Some cases have an equal amount of empty lines.
Expected results:
While this may not be critically important, i expect empty lines not to appear with no reason for it.
Is this a DUP of Bug 97278 - Retain original source formatting: Composer adds newlines when switching view modes (extra empty space added) ?
Reporter | ||
Comment 2•10 years ago
|
||
(In reply to therube from comment #1)
> Is this a DUP of Bug 97278 - Retain original source formatting: Composer
> adds newlines when switching view modes (extra empty space added) ?
Honestly, it's hard to say. It might be. On the other hand, 97278's description says that the blank lines are added when switching the tabs and that they may appear just about anywhere, while in this case it's heavily related to the multi-word texts wrapped in links or formatting tags.
Reporter | ||
Comment 3•10 years ago
|
||
(In reply to therube from comment #1)
> Is this a DUP of Bug 97278 - Retain original source formatting: Composer
> adds newlines when switching view modes (extra empty space added) ?
I did some extra research on the matter and can now confirm it's not a duplicate of that bug. Because some of the empty line blocks were added to the portions of text after i last switched the view modes.
Reporter | ||
Comment 4•10 years ago
|
||
I think i nailed the true nature of this bug.
Several conditions must be met in order to trigger it:
1) A multi-word text wrapped in a formatting tag (such as <b>, <i>, <a> and maybe something else too).
2) Composer should split that text into multiple lines (e.g. because of its internal optimal line length criteria).
After that, ANY modification(s) of the document that contains text that complies with the above conditions, followed by the "Save" operation cause a blank line to be inserted between the lines the multi-word text was split into.
In the attachment you can find a document that has an example of the multi-word text fitting the description on lines 22 and 23. Open it in Composer, alter the text in any way and anywhere, then press Save and examine the source code using an external editor: a blank line will appear after line 22.
Each time Composer is closed and then opened again to edit the document, following the reproduction sequence of actions causes the blank line count to increase. That explains why in my original report the number of blank lines in each individual case was different.
Comment 5•10 years ago
|
||
Reproducible with reporter's sample document and German SeaMonkey 2.32.1 Build 20150204202218 on German WIN7 64bit:
Every time I Save the document after a small edit from HTML source view (I did not test whether all conditions are necessara) a blank empty line will be inserted above
"!данные</a></i>".<br>"
I am not sure whether this one is really independent from "Bug 97278 - Retain original source formatting: Composer adds newlines when switching view modes (extra empty space added) "
My suggestion: Mark this one as DUP of Bug 97278 and test newly after fix for that Bug.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Comment 6•10 years ago
|
||
No objections, so I DUP this one.
@Reporter, please test again when we have a fix for Bug 97278 and reopen this one, if the fix does not heal this particular problem here.
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•