Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

<pre>, <textarea>, <listing> serialization doesn't match spec. #16

Closed
cscott opened this issue Feb 17, 2013 · 0 comments
Closed

<pre>, <textarea>, <listing> serialization doesn't match spec. #16

cscott opened this issue Feb 17, 2013 · 0 comments

Comments

@cscott
Copy link
Collaborator

cscott commented Feb 17, 2013

The HTML5 serialization spec at http://www.whatwg.org/specs/web-apps/current-work/multipage/the-end.html#serializing-html-fragments states that:

If current node is a pre, textarea, or listing element, and the first child node of the element, if any, is a Text node whose character data has as its first character a U+000A LINE FEED (LF) character, then append a U+000A LINE FEED (LF) character."

Currently domino always appends a newline after pre/textarea/listing. Patch forthcoming.

cscott added a commit to cscott/domino that referenced this issue Feb 17, 2013
The HTML5 serialization spec at
http://www.whatwg.org/specs/web-apps/current-work/multipage/the-end.html#serializing-html-fragments
states that:

"If current node is a pre, textarea, or listing element, and the first
child node of the element, if any, is a Text node **whose character data
has as its first character** a U+000A LINE FEED (LF) character, then
append a U+000A LINE FEED (LF) character."

Currently domino always appends a newline after pre/textarea/listing.
This patch fixes domino to match the WHATWG spec, only adding a newline
where it is necessary to maintain the proper value of the contents.
(Since an initial newline is silently discarded when it follows a
pre/textarea/listing.)

Closes gh fgnass#16.
fgnass added a commit that referenced this issue Feb 17, 2013
Only add newlines after <pre>/<textarea>/<listing> if necessary.
@fgnass fgnass closed this as completed Feb 18, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants