summaryrefslogtreecommitdiffhomepage
path: root/m4/fmt-code.m4
blob: 9b2c593031d67acff505d10270a83b0a4900946a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
m4_define(FMT_CODE, ‘‘pre .code-sample {=
	m4_esyscmd(sed '
		s/[@\\}]/\\&/g
		m4_regexp($1, .*\.diff$,
			/^+/s/.*/@ins{-&}/
			/^-/s/.*/@del{-&}/
		)
		s/.*/@code{-&}/
	' $(dirname 'm4___file__')/$1)
}’’)