Skip to content

Only first instance of white space is stripped #77

Description

@GoogleCodeExporter
When serializing HTML with the the strip_whitespace option on only the
first instance of whitespace in any Character token is stripped

You can see this if you running a whitespace unit test with the following data

{"description": "bare text with multiple groups of inner spaces",
 "options": {"strip_whitespace": true},
 "input": [["Characters", "foo \t\r\n\u000B\u000C bar and more \t\r\n bar"]],
 "expected": ["foo bar and more bar"]
}

which results in the failure

  1) Failure:
test_whitespace_4(Html5SerializeTestcase) [test/test_serializer.rb:48]:
bare text with multiple groups of inner spaces.
<"foo bar and more bar"> expected but was
<"foo bar and more \t\r\n bar">.

A patch is attached to fix this.


Original issue reported on code.google.com by joel.chippindale@gmail.com on 30 Jul 2008 at 11:00

Attachments:

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions