Closed draeton closed 11 years ago
Ah good spot - I thought I'd taken care of stuff like this but clearly I forgot about \u
happening anywhere. I guess the same would also happen if there was a \x
. I think the neatest way to do it would to be use some JSON.stringify
in the template - I'll take a look today and see about getting that added and tested.
Perfect!
When rendering the file name var in the head script, more filtering is needed on Windows platforms. The backslash path separator is operating as the start of an escape sequence when file and/or directory names start with a "u", so the backslash also needs to be escaped.
For example, if my file name is:
It is rendered as:
Instead of:
Which causes a syntax error in JavaScript. I imagine the change should be made in the
Docker.prototype.renderCodeHtml
method. I came up with this, but you may want to be more thorough:Very nice tool, by the way. I actually posted a question about this exact thing way back in 2011 - http://stackoverflow.com/questions/7128721/docco-like-tool-that-accommodates-jsdoc-style-comments