diff options
author | Jonas Smedegaard <dr@jones.dk> | 2013-04-21 17:02:44 +0200 |
---|---|---|
committer | Jonas Smedegaard <dr@jones.dk> | 2013-04-21 17:02:44 +0200 |
commit | 5cd51c3109cc6581753adf15485797a98b0e7825 (patch) | |
tree | 5df5622fe9303c7faccd94ecae2366259c1f4bb2 | |
parent | f1f328f207563e34c26f53b64b31f9fbfbc31296 (diff) |
Pass each file div through markdown, and drop per-changed-chunk line-breaks.
-rwxr-xr-x | localworddiff | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/localworddiff b/localworddiff index 0ff2f7a..4ee12d6 100755 --- a/localworddiff +++ b/localworddiff @@ -40,10 +40,6 @@ cat > "$3" <<EOF float: left; width: 49%; } -.file .hunk { - float: right; - width: 90%; -} .file .hunk del, .file .hunk ins { font-weight: bold; @@ -60,7 +56,7 @@ cat > "$3" <<EOF </head> <body> EOF -perl -MText::WordDiff -E 'say word_diff "'"$1"'", "'"$2"'", { STYLE => "HTMLTwoLines" }' >> "$3" +perl -MText::WordDiff -MText::Markdown=markdown -E '$d="<div class=\"file\">";$d_="<\/div>";foreach(split /(?:$d_\n)?$d/, word_diff "'"$1"'", "'"$2"'", { STYLE => "HTMLTwoLines" }){say $d.markdown($_).$d_ if ($_)}'>> "$3" cat >> "$3" <<EOF </body> </html> |