fix incorrect regex for c-like title detection
This commit is contained in:
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…
x
Reference in New Issue
Block a user