fix incorrect regex for c-like title detection

This commit is contained in:
ansuz 2016-11-03 11:30:46 +01:00
parent d512b113cd
commit 5f6ebb5cc1

View File

@ -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;
} }