/templates/type/text/diff.tmpl
Type: /type/template
body: value: $def with (a, b, name)

$ diffresults = better_diff(a.value.splitlines(), b.value.splitlines())

<tr>
    <td class="diff-header-side" valign="top">$name</td>
    <td colspan="2">
    <table>
$for row in diffresults:
    $ key = row[0]
    $ ai = row[1]
    $ a = row[2]
    $ bi = row[3]
    $ b = row[4]
    <tbody class="$key">
    <tr>
        <td class="diff-number">$ai</td>
        <td class='l'>$:spacesafe(a)</td>
        <td class="diff-number">$bi</td>
        <td class='r'>$:spacesafe(b)</td>
    </tr>
    </tbody>

</table>
</td>
</tr>


title: type/text/diff template