Skip to content

Commit

Permalink
feat: support @-syntax for getting properties with dev.get
Browse files Browse the repository at this point in the history
  • Loading branch information
stdword committed Apr 11, 2023
1 parent 7161e1d commit 3b0d95a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/tags.ts
Original file line number Diff line number Diff line change
Expand Up @@ -191,14 +191,16 @@ function get(context: ILogseqContext, path: string): string {

path = _arg(path)

path = path.replaceAll('@', '.props.')

const parts = path.split('.')
if (parts[0] === 'c')
parts.shift()

return getByPath(context, parts) ?? ''
}

/* search */
/* query */
// where: source
// how: tree-path-spec, by prop, by ancestor?
// what:
Expand Down

0 comments on commit 3b0d95a

Please sign in to comment.