Fix: (org-dblock-write:org-ql) remove cookies
Fix #248 Giving this edge case (https://github.com/alphapapa/org-ql/pull/249#issuecomment-906765405) the use of `:title` could be not optimal. This commit uses a regexp to remove the cookie directly.
This commit is contained in:
parent
e0febbfd5c
commit
ca5db3c04b
1 changed files with 4 additions and 2 deletions
|
|
@ -285,9 +285,11 @@ For example, an org-ql dynamic block header could look like:
|
|||
(list (cons 'todo (lambda (element)
|
||||
(org-element-property :todo-keyword element)))
|
||||
(cons 'heading (lambda (element)
|
||||
(org-make-link-string (car (org-element-property :title element))
|
||||
(org-make-link-string (replace-regexp-in-string "\[[[:digit:]]*/[[:digit:]]*\]\\|\[[[:digit:]]*\%\]" ""
|
||||
(org-element-property :raw-value element))
|
||||
(org-link-display-format
|
||||
(car (org-element-property :title element))))))
|
||||
(replace-regexp-in-string "\[[[:digit:]]*/[[:digit:]]*\]\\|\[[[:digit:]]*\%\]" ""
|
||||
(org-element-property :raw-value element))))))
|
||||
(cons 'priority (lambda (element)
|
||||
(--when-let (org-element-property :priority element)
|
||||
(char-to-string it))))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue