fix(parser): align Go and JS parsers with capture grammar spec
Kind prefixes now follow the canonical grammar: `-` for todo, `@time` for event, `!time` for reminder. Removed `*`/`◇`/`▸` as capture aliases (display-layer only). Added `\` escape prefix, `?` query mode, `!pin` flag extraction, `##word` hash escape, and tag lowercasing. Both parsers produce identical results.
This commit is contained in:
@@ -16,6 +16,7 @@ type CreateEntityRequest struct {
|
||||
Glyph *string `json:"glyph"`
|
||||
TimeAnchor *string `json:"time_anchor"`
|
||||
Tags []string `json:"tags"`
|
||||
Pinned *bool `json:"pinned"`
|
||||
CardType *string `json:"card_type"`
|
||||
CardData *string `json:"card_data"`
|
||||
}
|
||||
@@ -145,6 +146,9 @@ func createEntity(store *db.Store) http.HandlerFunc {
|
||||
TimeAnchor: req.TimeAnchor,
|
||||
Tags: req.Tags,
|
||||
}
|
||||
if req.Pinned != nil && *req.Pinned {
|
||||
e.Pinned = true
|
||||
}
|
||||
|
||||
if req.CardType != nil {
|
||||
if !db.ValidCardType(*req.CardType) {
|
||||
|
||||
Reference in New Issue
Block a user