README.md in dirb-1.0.0 vs README.md in dirb-1.0.1

- old
+ new

@@ -38,29 +38,31 @@ +That's swell Outputing the diff as html is easy too. >> puts Dirb::Diff.new(string1, string2).to_s(:html) - <ul class="diff"> - <li class="del"><del>Hello how are you</del></li> - <li class="ins"><ins>Hello how are you?</ins></li> - <li class="unchanged"><span>I'm fine</span></li> - <li class="del"><del>That's great</del></li> - <li class="ins"><ins>That's swell</ins></li> - </ul> + <div class="diff"> + <ul> + <li class="del"><del>Hello how are you</del></li> + <li class="ins"><ins>Hello how are you?</ins></li> + <li class="unchanged"><span>I'm fine</span></li> + <li class="del"><del>That's great</del></li> + <li class="ins"><ins>That's swell</ins></li> + </ul> + </div> Then try adding this css to your stylesheets: - .diff{overflow:auto;} - .diff ul{background:#fff;overflow:auto;font-size:13px;list-style:none;margin:0;padding:0;display:table;width:100%;} - .diff del, .diff ins{display:block;text-decoration:none;} - .diff li{padding:0; display:table-row;margin: 0;} - .diff li.ins{background:#9f9;} - .diff li.del{background:#ccf;} - .diff li:hover{background:#ffc} - .diff del, .diff ins, .diff span{white-space:pre;font-family:courier;} + .diff{overflow:auto;} + .diff ul{background:#fff;overflow:auto;font-size:13px;list-style:none;margin:0;padding:0;display:table;width:100%;} + .diff del, .diff ins{display:block;text-decoration:none;} + .diff li{padding:0; display:table-row;margin: 0;} + .diff li.ins{background:#9f9;} + .diff li.del{background:#ccf;} + .diff li:hover{background:#ffc} + .diff del, .diff ins, .diff span{white-space:pre;font-family:courier;} -Dirb::Diff also alows you to set a default format. Here we set the default to +`Dirb::Diff` also alows you to set a default format. Here we set the default to use ANSI termnial color escape sequences. >> Dirb::Diff.default_format = :color => :color >> puts Dirb::Diff.new(string1, string2) # prints color in the terminal