logseq-automatic-linker icon indicating copy to clipboard operation
logseq-automatic-linker copied to clipboard

Automatic parsing feature parses page titles and page properties

Open cullen-dev opened this issue 1 year ago • 2 comments

Original Issue: Linker parsing property blocks #28

Details:

Sep 23, 2022

Having the "autocomplete on Enter" on, the linker parses property blocks and tries to link them. This corrupts the syntax and throws a parsing exception for the block. E.g., type:: page becomes [[type]]:: [[page]]

Sep 24, 2022 - @andreoliwa's response:

Hi, this should have been fixed by #29. The new release made today includes the fix: https://github.com/sawhney17/logseq-automatic-linker/releases/tag/1.3.0


Update 2024-07-18

According to the information above, this issue should have been resolved by #29 however, it does not appear that this issue has truly been resolved. It may have been previously, but it appears that this behavior is still present. I have only tested this issue with the alias:: and title:: properties but I am assuming this applies to any and all page properties, but I have not specifically tested any others. The impact on these two properties alone is enough for it to be a breaking issue for me.

Example:

When attempting to create a new page called "mobile version" with the following properties:

alias:: mobile versions, mobile version's, mobile versions', mobile-version, mobile-versions title:: mobile version

image

Upon pressing Enter key, the auto-linker plugin parses the page title and the alias values into page references. #29

alias:: mobile [[versions]], [[mobile [[version]]]]'s, [[mobile]] [[versions']], mobile-version, mobile-versions title:: mobile [[version]]

image

Any aliases affected by this do not work as intended. For example, the alias, "mobile versions", that I attempted to add, became "mobile [[versions]]". As a result, when I try to create a page reference to "mobile versions" using "[[mobile versions]]", it attempts to creates a new page, because it does not recognize it as an alias of the "mobile version" page:

image

I'm not sure if a more recent update broke the fixes implemented in #29, or if this is the intended behavior, but it is really frustrating. Obviously I can just turn off the auto-parsing feature when creating new pages/adding page properties, but I don't always think about it, especially when I am in a hurry. I don't see any personal use cases where I would want to create automatic links in my properties. In the case that I wanted auto-links in my properties block, I could use the hotkey for auto-linking an individual block. Any help/suggestions??!

I really love this plugin and it has saved me a ton of time! However, the current functionality is driving me just a little crazy.

Thanks in advance for any help!

cullen-dev avatar Jul 18 '24 18:07 cullen-dev

Have you tried to disable all other plugins and see if it is working? I disable all of the plugins, restarted, and it started to work most of the time. The behavioral is still random, but its working more often then not, so its improvement. Hopefully, when enable the plugins and the behavioral remain random, not worse.

Hananel-Hazan avatar Dec 26 '24 22:12 Hananel-Hazan

@cullen-dev sorry, I missed the previous notification (my notifications were a mess).

  • As far as i remember, #29 will only prevent the linking of the property name itself, not its values

In your example, if you type this property:

- My text
  version: v123

It will NOT become:

- My text
  [[version]]: v123

The problem you mentioned needs another separate fix. 😕

I renamed #29 to fix: don't auto-link property names to make it clearer.

andreoliwa avatar Dec 26 '24 22:12 andreoliwa