Fix logic in _noteToTitle in itemPane.js (if no newline in note the title would be "Untitled Note") -- though it'd be better to do what Stickies do and just find the first bit of text, even if it's not on the

first line (regex is probably easiest)
This commit is contained in:
Dan Stillman 2006-06-16 07:44:55 +00:00
parent fd85af40f8
commit 7a8ddb1beb

View file

@ -319,7 +319,12 @@ ScholarItemPane = new function()
function _noteToTitle(text)
{
var t = text.substring(0, Math.min(text.indexOf("\n"), 30) );
var t = text.substring(0, 30);
var ln = t.indexOf("\n");
if (ln>-1 && ln<30)
{
t = t.substring(0, ln);
}
if(t == "")
{