www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README | LICENSE

commit 7a8ddb1beb8a1309af2b11d11979d8acaeb6b818
parent fd85af40f89550e4da20638bd5693d0e49ae8682
Author: Dan Stillman <dstillman@zotero.org>
Date:   Fri, 16 Jun 2006 07:44:55 +0000

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)


Diffstat:
Mchrome/chromeFiles/content/scholar/itemPane.js | 7++++++-
1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/chrome/chromeFiles/content/scholar/itemPane.js b/chrome/chromeFiles/content/scholar/itemPane.js @@ -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 == "") {