summaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rwxr-xr-xinclude/fmt-code3
-rw-r--r--include/lib.m45
2 files changed, 8 insertions, 0 deletions
diff --git a/include/fmt-code b/include/fmt-code
new file mode 100755
index 0000000..9da3828
--- /dev/null
+++ b/include/fmt-code
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+sed 's|.*|<code>&</code>|' "${2%/*}/$1"
diff --git a/include/lib.m4 b/include/lib.m4
index 5d6cf72..2535ed2 100644
--- a/include/lib.m4
+++ b/include/lib.m4
@@ -2,3 +2,8 @@ m4_define(
m4_footer,
`m4_define(`m4___caller__', m4___file__)m4_include(footer.html)'
)
+
+m4_define(
+ m4_fmt_code,
+ `m4_esyscmd(fmt-code "$1" m4___file__)m4_dnl'
+)