Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Double hash (#) in template

Tags:

velocity

In an Apache Velocity template, double hashtag (i.e. ##) means comment, but I want to add ## literals into the template. How can I do that?

The reason is that I want to make a template for Github wiki, and the template includes h2's

like image 827
Michael Kim Avatar asked Sep 07 '25 15:09

Michael Kim


2 Answers

After some research I found this:

#set ( $double_hash = '##' )

${double_hash}
like image 107
Michael Kim Avatar answered Sep 10 '25 06:09

Michael Kim


I've even double the stuff in my jira release template that produce markdown...

#set ( $simple_hash = '#' )
#set ( $double_hash = '##' )

Thx for the hint !!

like image 24
PajE Avatar answered Sep 10 '25 06:09

PajE