update some line parsing
This commit is contained in:
4
main.js
4
main.js
@@ -222,7 +222,7 @@ function processLine(line, noDate, date, data)
|
||||
noDate = noDate.replace(/[ \t][ \t]+/g, ' '); // remve multeple spaces/tabs in a row
|
||||
|
||||
// title and group
|
||||
res = noDate.match(/^ ?- ([^\[\]<>{}]*) - ([^\[\]<>{}]*)/);
|
||||
res = noDate.match(/^ ?- (.*) - (.*)/);
|
||||
if (res != null)
|
||||
{
|
||||
item["group"] = res[1];
|
||||
@@ -231,7 +231,7 @@ function processLine(line, noDate, date, data)
|
||||
else
|
||||
{
|
||||
// no group look for only title
|
||||
res = noDate.match(/^ ?- ([^\[\]<>\{\}]*)/);
|
||||
res = noDate.match(/^ ?- (.*)/);
|
||||
if (res != null)
|
||||
{
|
||||
item["title"] = res[1];
|
||||
|
||||
Reference in New Issue
Block a user