[Yanel-dev] [Bug 7330] New: Yanel's HTMLSerializer adds line-breaks after closing "ins" and "del" tags => spurious whitespace on pages

bugzilla at wyona.com bugzilla at wyona.com
Thu Dec 3 11:26:51 CET 2009


http://bugzilla.wyona.com/cgi-bin/bugzilla/show_bug.cgi?id=7330

           Summary: Yanel's HTMLSerializer adds line-breaks after closing
                    "ins" and "del" tags => spurious whitespace on pages
           Product: Yanel
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal (C)
          Priority: P3
         Component: General
        AssignedTo: yanel-development at wyona.com
        ReportedBy: guillaume.deflache at wyona.com
         QAContact: yanel-development at wyona.com


In org.wyona.yanel.core.serialization.HTMLSerializer these tags are not in the
inline tags' list, although they *may* be inline (but also block in other
contexts, see <http://www.w3.org/TR/html401/struct/text.html#h-9.4>:
> These two elements are unusual for HTML in that they may serve as either block-level or inline elements (but not both). They may contain one or more words within a paragraph or contain one or more block-level elements such as paragraphs, lists and tables.
).

Note that in this class the inline/block distinction which matters is not the
structural one, but the presentational one, that is if the browser is likely to
ignore whitespace after the closing tag (because the element is anyway going to
be displayed on a separate line according to HTML standard, so this whitespace
will not matter).


IMHO it would be much simpler to allow line-breaks only on "non-hybrid"
displayed-as-block elements, reversing the logic.
A list of such elements can be found in
<http://www.w3.org/TR/CSS2/sample.html>: simply pick all elements which
"display" property is exactly "block" there.

We should also add the line-break before the element opening tag and not after
the element closing tag, because
http://www.w3.org/TR/html401/struct/global.html#h-7.5.3 says:
> [...] Generally, block-level elements begin on new lines [it does not say: end with a line-break!]


-- 
Configure bugmail: http://bugzilla.wyona.com/cgi-bin/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug, or are watching the QA contact.
You are the assignee for the bug, or are watching the assignee.


More information about the Yanel-development mailing list