I need to create a velocity document that has some lines prefixed with ¨## Foo", but since the #
is the velocity directive command, it is not working for me.
What I want my output document to look like:
## Foo this
## Bar that
k1, v1
k2, v2
k3, v3
Escaping has not worked out how I expected. The below does not work, obviously, as the #
s are un-escaped):
## Foo this
## Bar that
#foreach( $foo in $bar )
$foo.key, $foo.value
#end
The ## lines don't show up--again, as expected. But, my attempts at escaping do not work either. Escaping solution one:
\## Foo this
\## Bar that
#foreach( $foo in $bar )
$foo.key, $foo.value
#end
or this, escaping solution two:
\#\# Foo this
\#\# Bar that
#foreach( $foo in $bar )
$foo.key, $foo.value
#end
or even this...
# set($msg = "##")
$msg Foo this
$msg Bar that
#foreach( $foo in $bar )
$foo.key, $foo.value
#end
This last one really confused me.
Any ideas?