Fix: (-view--format-element) Remove text properties from keywords
Modes like org-indent-mode and org-modern can add text properties to to-do keywords in Org buffers, and those properties can "bleed over" when org-element copies those regions into strings. When those strings are then displayed in an org-ql-view buffer, they can affect how the keywords appear, e.g. having extra spaces prefixing them, which breaks alignment. We apply faces to the keywords ourselves, so we don't need any properties from the source buffer. Fixes #455.
This commit is contained in:
parent
b6704c2814
commit
357d533b75
3 changed files with 51 additions and 45 deletions
|
|
@ -872,7 +872,8 @@ return an empty string."
|
|||
(title (--> (org-ql-view--add-faces element)
|
||||
(org-element-property :raw-value it)))
|
||||
(todo-keyword (-some--> (org-element-property :todo-keyword element)
|
||||
(org-ql-view--add-todo-face it)))
|
||||
(org-ql-view--add-todo-face
|
||||
(substring-no-properties it))))
|
||||
(tag-list (if org-use-tag-inheritance
|
||||
;; MAYBE: Use our own variable instead of `org-use-tag-inheritance'.
|
||||
(if-let ((marker (or (org-element-property :org-hd-marker element)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue