diff --git a/templates/remark/by_id.txt.ep b/templates/remark/by_id.txt.ep index a461385..7ff72b0 100644 --- a/templates/remark/by_id.txt.ep +++ b/templates/remark/by_id.txt.ep @@ -1,9 +1,12 @@ -% if (keys %{$remark}) { - %= $remark->{'id'}; - %= $remark->{'date'}; - %= $remark->{'author'}; - - %= $remark->{'body'}; -% } else { - %= stash 'error'; -% } +%# Because this is a text template (vs HTML) the whitespace is +%# significant. Ending a line of embedded Perl with an equal sign +%# will prevent some editors from auto-indenting the next line, hence +%# the '#=' comment at the end of some lines. +% if (keys %{$remark}) { #= +%= $remark->{'id' }; +%= $remark->{'date' }; +%= $remark->{'author'} . "\n"; +%= $remark->{'body' }; +% } else { #= +%= stash 'error'; +% } #= diff --git a/templates/thread/by_id.txt.ep b/templates/thread/by_id.txt.ep index 17c895a..38289cb 100644 --- a/templates/thread/by_id.txt.ep +++ b/templates/thread/by_id.txt.ep @@ -1,10 +1,13 @@ -% if (keys %{$thread}) { - %= $thread->{'id'}; - %= $thread->{'title'}; - %= $thread->{'date'}; - %= $thread->{'author'}; - - %= $thread->{'body'}; -% } else { - %= stash 'error'; -% } +%# Because this is a text template (vs HTML) the whitespace is +%# significant. Ending a line of embedded Perl with an equal sign +%# will prevent some editors from auto-indenting the next line, hence +%# the '#=' comment at the end of some lines. +% if (keys %{$thread}) { #= +%= $thread->{'id' }; +%= $thread->{'title' }; +%= $thread->{'date' }; +%= $thread->{'author'} . "\n"; +%= $thread->{'body' }; +% } else { #= +%= stash 'error'; +% } #=