1 ! Copyright (C) 2008, 2010 Slava Pestov
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: accessors kernel lcs sequences strings xml.syntax
7 GENERIC: diff-line ( obj -- xml )
9 : item-string ( item -- string )
10 item>> [ CHAR: no-break-space 1string ] when-empty ;
14 [XML <td class="retain"><-></td> XML]
15 dup [XML <tr><-><-></tr> XML] ;
21 <td class="insert"><-></td>
28 <td class="delete"><-></td>
33 : htmlize-diff ( diff -- xml )
36 <table width="100%" class="comparison">
37 <tr><th>Old</th><th>New</th></tr>