You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Unfortunately, this behavior is dependent on the underlying libraries -- there's not much we can do in Nokogiri to change serialization conventions. :(
Sorry we can't do much for your problem, but thanks for using Nokogiri.
(Using Nokogiri 1.5.0)
For almost all inline tags, Nokogiri preserves space between subsequent tags, as I'd expect it to:
irb(main):004:0> Nokogiri::HTML.fragment("<em>a</em> <em>b</em>").to_s
=> "<em>a</em> <em>b</em>"
However, between sup and sub tags, the space gets lost:
irb(main):002:0> Nokogiri::HTML.fragment("<sup>a</sup> <sup>b</sup>").to_s
=> "<sup>a</sup><sup>b</sup>"
irb(main):003:0> Nokogiri::HTML.fragment("<sub>a</sub> <sub>b</sub>").to_s
=> "<sub>a</sub><sub>b</sub>"
Since it makes a difference when displayed in the browser whether the space is there or not, this looks like a bug to me?
The text was updated successfully, but these errors were encountered: