mirror of
https://github.com/jackyzha0/quartz.git
synced 2025-12-24 13:24:05 -06:00
fix(transformer): use path.relative for improved path handling in last modified date calculation
This commit is contained in:
parent
88d8d89171
commit
c5cc071590
@ -58,8 +58,7 @@ export const CreatedModifiedDate: QuartzTransformerPlugin<Partial<Options>> = (u
|
||||
// or 1+ level higher in case of a submodule/subtree setup
|
||||
repo = Repository.discover(fullFp)
|
||||
}
|
||||
|
||||
var relativePath = fullFp.replace(repo.workdir()!, "")
|
||||
const relativePath = path.relative(repo.workdir()!, fullFp)
|
||||
|
||||
try {
|
||||
modified ||= await repo.getFileLatestModifiedDateAsync(relativePath)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user