changelog shortlog graph tags branches changeset files revisions annotate raw help

Mercurial > core / lisp/lib/organ/element/lesser/node-property.lisp

changeset 698: 96958d3eb5b0
parent: 6ad95601645e
author: Richard Westhaver <ellis@rwest.io>
date: Fri, 04 Oct 2024 22:04:59 -0400
permissions: -rw-r--r--
description: fixes
1 ;;; lib/organ/element/lesser/node-property.lisp --- Org Node Property Element
2 
3 ;; Node properties match the patterns:
4 
5 #|
6 :NAME: VALUE
7 :NAME:
8 :NAME+: VALUE
9 :NAME+:
10 |#
11 
12 ;;; Code:
13 (in-package :organ)
14 
15 (define-org-element node-property ((name :initarg :name) (value :initarg :value)) :lesser t)
16 
17 ;; assumes caller is org-property-drawer = single line
18 (define-org-parser (node-property :from string)
19  (multiple-value-bind (match subs)
20  (scan-to-strings org-property-rx input)
21  (when match
22  (let ((name (aref subs 0))
23  (value (aref subs 1)))
24  (org-create :node-property :name name :value value)))))