jbt / docker

Documentation generator
http://jbt.github.com/docker
MIT License
234 stars 56 forks source link

`/*` in Javascript "Literal" Regex Incorrectly Interpreted as Comment #73

Closed jasonseney closed 9 years ago

jasonseney commented 10 years ago

The two characters /* inside of a literal javascript regex causes docker to interpret this as if it is the beginning of a comment block. Example:

var stringRegex = new Regex("\/*");
var literalRegex = /\/*/;

/**
* Comment
*/
var foo = bar;

This will break on the 2nd line, where it gets built out as part of the comment.