From 61b0a9547822ad63957a13ff68843c4f578a46b8 Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Sun, 24 Nov 2024 14:03:27 +0100 Subject: add curriculum deltas --- bin/mddelta.sh | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100755 bin/mddelta.sh (limited to 'bin') diff --git a/bin/mddelta.sh b/bin/mddelta.sh new file mode 100755 index 0000000..7db89f1 --- /dev/null +++ b/bin/mddelta.sh @@ -0,0 +1,26 @@ +#!/bin/sh + +# SPDX-FileCopyrightText: 2024 Jonas Smedegaard ' -x '' -y '' -z '' "$1" "$2" + +# annotate changes with both span and del/ins html tags +# * only del/ins confuses markdown parsers around unnumbered lists +# inspiration: https://stackoverflow.com/a/2384393/18619283 +set - --start-insert='' --stop-insert='' "$@" +set - --start-delete='' --stop-delete='' "$@" + +# treat # as whitespace and other punctuation as delimiters +set - --white-space=' \t\n#' --delimiters=',.?:;[]()-_/' "$@" + +# compact difference detection and representation +set - --algorithm=best --repeat-markers "$@" + +#echo dwdiff "$@" +exec dwdiff "$@" -- cgit v1.2.3