diff options
author | Thomas Voss <mail@thomasvoss.com> | 2023-08-05 23:30:58 +0200 |
---|---|---|
committer | Thomas Voss <mail@thomasvoss.com> | 2023-08-05 23:30:58 +0200 |
commit | cfa35dcb2d332977e80a5811b6d42e9949bd4814 (patch) | |
tree | 370274078ded58e2a3bded288feaccfa01b2c1a6 /include | |
parent | 87dc34ab660fe91d3e77bde7548a9c6d05d28f03 (diff) |
Use a macro to wrap code in <code> tags
Diffstat (limited to 'include')
-rwxr-xr-x | include/fmt-code | 3 | ||||
-rw-r--r-- | include/lib.m4 | 5 |
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' +) |