Sitelet https://github.com/samg/diffy/issues/38
Skip to content

Lines different only by newline character don't come up as different in HTML mode only #38

Description

@JasonBarnabe

Diffy 3.0.2, Ruby 2.0.0.

2.0.0p247 :014 > Diffy::Diff.new("one\ntwo\nthree\n", "one\r\ntwo\r\nthree\r\n").to_s
 => "-one\n-two\n-three\n+one\r\n+two\r\n+three\r\n" 
2.0.0p247 :015 > Diffy::Diff.new("one\ntwo\nthree\n", "one\r\ntwo\r\nthree\r\n").to_s(:html_simple)
 => "<div class=\"diff\">\n  <ul>\n    <li class=\"del\"><del>one</del></li>\n    <li class=\"del\"><del>two</del></li>\n    <li class=\"del\"><del>three</del></li>\n    <li class=\"ins\"><ins>one</ins></li>\n    <li class=\"ins\"><ins>two</ins></li>\n    <li class=\"ins\"><ins>three</ins></li>\n  </ul>\n</div>\n" 
2.0.0p247 :016 > Diffy::Diff.new("one\ntwo\nthree\n", "one\r\ntwo\r\nthree\r\n").to_s(:html)
 => "<div class=\"diff\"></div>" 

Why would these not show up as different when using :html output only?

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

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions