Skip to content

Commit

Permalink
fix: displaying c.tags.date context
Browse files Browse the repository at this point in the history
  • Loading branch information
stdword committed Feb 12, 2024
1 parent c5647ec commit ccfec09
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/context.ts
Expand Up @@ -108,6 +108,11 @@ export class Context {
return item.filterForDisplaying()
return item
})
else if (value instanceof dayjs)
// @ts-expect-error
value = `dayjs(${value.toISOString()})`
else if (value == dayjs)
value = 'dayjs()'
else if (typeof value === 'function') {
const doc = value.toString()
const signature = doc.match(/function\s*\w*?\((.*?)\)\s*\{/)
Expand Down

0 comments on commit ccfec09

Please sign in to comment.