Lines Matching refs:comment
11 var comment = '';
14 comment = selection.getText();
17 lastchar = comment.substr(-1,1);
21 if (comment == '') {
26 if (comment.match(/^\s*\/\*/) && comment.match(/\*\/\s*$/)) {
29 comment = comment.replace(/^ *\/\*+ *\n?/,''); // uncomment left
31 comment = comment.replace(/^ *\/\*+ */,'');
33 comment = comment.replace(/ *\*+\/\s*$/,''); // uncomment right
35 pasteText(selection, comment);
41 comment = "/*\n" + comment + " */\n";
43 if (comment.match(/^\n/)) {
44 comment = comment.replace(/^\n?/,"/*\n");
45 comment = comment + " */";
47 comment = "/* " + comment + " */";
49 if (!(prevchar.match(/\s/))) { comment = " " + comment; }
50 if (!(nextchar.match(/\s/))) { comment = comment + " "; }
53 pasteText(selection, comment);