How to Escape # Character in File Template

I'm writing a File Template for Coffeescript (using the plugin), and would like to include a block comment with the following syntax:

###
     ${PROJECT_NAME}

     ${FILE_NAME}

     @author ${USER}
     
     @note Created on ${DATE} by ${PRODUCT_NAME}
     @note uses Codoc
     @see https://github.com/coffeedoc/codo
###


However, I get the following error, due to the # keyword:

Error parsing file template: Lexical error,   Encountered:  after : "" at Coffeescript File Header.coffee[line 11, column 4]

How can I escape the # character and use this file includes template?

2 comments

Hi there,

Please try this -- seems to work OK (checked in .php file)

#set($comment = '###')
${comment}
... some more template content ...
${comment}
0

Thanks!  Working!

Just not working for the Includes template.  I get the following error:

Error parsing file template: Failed to parse String literal at Coffeescript File Header.coffee[line 1, column 17]

Where Coffeescript File Header is:

#set($comment = "###")
${comment}
     ${PROJECT_NAME}

     ${FILE_NAME}

     @author ${USER}
     
     @note Created on ${DATE} by ${PRODUCT_NAME}
     @note uses Codoc
     @see https://github.com/coffeedoc/codo
${comment}


Suggestions?
EDIT: file include templates worked once I changed double quotes " to single quotes '.

0

Please sign in to leave a comment.