fix incorrect regex for c-like title detection

pull/1/head
ansuz 8 years ago
parent d512b113cd
commit 5f6ebb5cc1

@ -250,10 +250,10 @@ define([
} }
// lines including a c-style comment are also valuable // lines including a c-style comment are also valuable
var clike = /^\s*(\/\*|\/\/)(.*?)(\*\/)$/; var clike = /^\s*(\/\*|\/\/)(.*)?(\*\/)*$/;
if (clike.test(line)) { if (clike.test(line)) {
line.replace(clike, function (a, one, two) { line.replace(clike, function (a, one, two) {
text = two; text = two.replace(/\*\/\s*$/, '').trim();
}); });
return true; return true;
} }

Loading…
Cancel
Save