C++ Multi-line comments using backslash

Yes. Lines terminated by a \ are spliced together with the next line very early in the process of translation. It happens at phase 2 of translation, before comment removal and before preprocessor has a chance to do its work. Comment recognition and removal takes place at phase 3. For this reason you can turn … Read more

How can I remove HTML comments in my Facelets?

There are actually two ways: To remove ALL comments, add this to web.xml: <context-param> <param-name>javax.faces.FACELETS_SKIP_COMMENTS</param-name> <param-value>true</param-value> </context-param> or when you’re still on JSF 1.2 which doesn’t use Facelets as default view technology yet: <context-param> <param-name>facelets.SKIP_COMMENTS</param-name> <param-value>true</param-value> </context-param> To remove specific comments only, use <ui:remove>. <ui:remove><!– This is a HTML comment. –></ui:remove>

Commenting Regular Expressions

Unfortunately, JavaScript doesn’t have a verbose mode for regular expression literals like some other langauges do. You may find this interesting, though. In lieu of any external libraries, your best bet is just to use a normal string and comment that: var r = new RegExp( ‘(‘ + //start capture ‘[0-9]+’ + // match digit … Read more

How do you do block comments in YAML?

YAML supports inline comments, but does not support block comments. From Wikipedia: Comments begin with the number sign ( # ), can start anywhere on a line, and continue until the end of the line A comparison with JSON, also from Wikipedia: The syntax differences are subtle and seldom arise in practice: JSON allows extended … Read more