-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(Org-mode Interop) Clobbering Properties #32
Comments
...we could also do a simpler value slurp and leave trailing whitespace unaltered, too. I can't imagine anything relies on trailing whitespace in values though, given that org won't read it. |
… item deletion. browser maximized - don't adjust position on first opening TM. fixed regex to not clobber org properties
Thanks for the detailed bug report! And apologies for the delay, I haven't been monitoring this list very closely. The most recent 1.0.2 version of BT, which just went live in the Chrome Store, fixes the bug. I went with the approach of grabbing everything to the end of the line: |
Thanks a lot! No problem about response time, I can only apologise for throwing so many thoughts and ideas at you. I mean well. |
This may not be a design goal, or perhaps not for 1.0, but I think it's a good idea to leave any org-mode markup that BrainTool doesn't understand unaltered, so that the BrainTool.org file can seamlessly interop with Emacs, eleventy, org-roam, LogSeq, and other apps that speak org.
The Problem
I tried adding a property drawer to one of the links:
:PROPERTIES:
:ID: this-is-my-id
:prop: value is a string with whitespace
:END:
After importing to BT, editing the link, then
M-x revert-buffer
in Emacs, it's been changed to::PROPERTIES:
:ID: this
:prop: value
:END:
The Solution
The problem is in BTAppNode.js line 595.
Can be altered to:
This uses the greediness of \s* to guarantee we're not starting the value on whitespace, the greediness of
.*
to ensure the whole value is included, and the \w character to effectively strip any trailing whitespace (matching the behaviour of Emacsorg-entry-get
.The text was updated successfully, but these errors were encountered: