mirror of
https://github.com/xuthus83/pigallery2.git
synced 2025-01-14 14:43:17 +08:00
comment fix
This commit is contained in:
parent
e85fa29672
commit
43b970c992
@ -64,6 +64,7 @@ export class BlogService {
|
||||
const matches = Array.from(markdown.matchAll(splitterRgx));
|
||||
|
||||
const getDateGroup = (date: Date) => {
|
||||
// get UTC midnight date
|
||||
const dateNum = Utils.makeUTCMidnight(date).getTime();
|
||||
let groupDate = dates.find((d, i) => i > dates.length - 1 ? false : dates[i + 1] > dateNum); //dates are sorted
|
||||
|
||||
@ -106,7 +107,6 @@ export class BlogService {
|
||||
|
||||
for (let i = 0; i < matches.length; ++i) {
|
||||
const matchedStr = matches[i][0];
|
||||
// get UTC midnight date
|
||||
const dateNum = new Date(matchedStr.match(dateRgx)[0]);
|
||||
|
||||
const groupDate = getDateGroup(dateNum);
|
||||
|
Loading…
x
Reference in New Issue
Block a user