eval/rack-pjax — Issue #4: Nokogiri parsing is affecting white space
Author: matthooks
Created: 2011-11-06 19:14:43+00:00
State: open

Re: https://github.com/eval/rack-pjax/blob/master/lib/rack/pjax.rb#L21

The call to `Nokogiri::XML::Node#inner_html` here returns HTML that doesn't respect the original response's whitespace between elements, which can affect elements with their `display` property set to `inline-block`.

In my specific case, the non-PJAX response looks like:

```html

text
text

```

But the PJAX response looks like:

```html

text

text

```

There are several front-end workarounds (using JS to remove the white space, setting the parent element to `font-size:0;`), but this should probably be handled in the middleware. Thoughts?