SugarCube supports block comments in three flavors: C-style, TiddlyWiki, and HTML. Of the three, the C-style block comment is supported everywhere--i.e. within markup, JavaScript, and CSS. The latter two are only supported within markup.
As far as I know Harlowe's documentation only describes the HTML comment <!-- Comment --> element, which can also be used within standard passages in SugarCube (1 & 2).
SugarCube (1 & 2) supports a number of different comment markups depending on which passage type you are editing.
1. Standard Passage:
<!-- HTML Comment element -->
/* Javascript / CSS multi-line comment block */
/% Wiki multi-line comment block %/
JavaScript code chunks are never processed by the Wikifier in any way. Some do pass through the Wikifier, generally as arguments to or the contents of macros, however, no actual processing is done.
In JavaScript, /…/ is the regular expression literal syntax. So, the following:
/% Wiki multi-line comment block %/
Yields a RegExp object, whose source is:
% Wiki multi-line comment block %
So, while you did not receive an error, you definitely weren't doing what you though you were there.
I asked where you saw that behavior because it should be different in JavaScript—yields a RegExp object—versus CSS—parsing error. For example, the following CSS will stop processing at the invalid comment, thus making the <body> background lime, rather than red:
body {
background-color: lime;
}
/% OMGWTFBBQ %/
body {
background-color: red;
}
Recommendation: In most cases, just use the C-style block comment—e.g. /* comment */—since it is supported everywhere.
Comments
For example:
SugarCube (1 & 2) supports a number of different comment markups depending on which passage type you are editing.
1. Standard Passage:
2. Story Javascript passage:
3. Story Stylesheet (CSS) passage:
But they didn't produce an error when I tested them before answering so I assumed you were escaping them.
Where did you see this behavior?
I asked where you saw that behavior because it should be different in JavaScript—yields a RegExp object—versus CSS—parsing error. For example, the following CSS will stop processing at the invalid comment, thus making the <body> background lime, rather than red:
Recommendation: In most cases, just use the C-style block comment—e.g. /* comment */—since it is supported everywhere.