From 699ca6cab6fe62650293b81694af8a13e4ac7827 Mon Sep 17 00:00:00 2001 From: Brian Cully Date: Sun, 12 Nov 2017 11:55:06 -0500 Subject: Add comment blocks to templates. Comments are {# some comment} syntax for documentation purposes. --- xmpt | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'xmpt') diff --git a/xmpt b/xmpt index 8fed801..a43c037 100755 --- a/xmpt +++ b/xmpt @@ -43,6 +43,7 @@ if (@ARGV) { } binmode($inh, ':utf8'); binmode($outh, ':utf8'); + eval_in($inh, $outh, \%conf, @plans); waitpid($pid, 0) if $pid; @@ -106,6 +107,10 @@ sub parse_template { if ($intext) { if ($tok =~ /{/) { + if ($line =~ /^#/) { + do { my $tok = shift @parts } until $tok = '}'; + next; + } $thunkstart = $line; $intext = 0; } else { -- cgit v1.2.3