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:
parent
fd85af40f8
commit
7a8ddb1beb
1 changed files with 6 additions and 1 deletions
|
@ -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 == "")
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue