Links not recognized when substrings of text Properties

Steps to reproduce

  1. Enable properties
  2. Create several notes
  3. Open one of the notes. In a text property, properly delimited with double quotes, add a link to another note. Observe that it is recognized as a link (hyperlinked and available for right-click and so forth; and it is treated as a link in the outgoing and backlinks panes). For example see Additional info and screenshots.
  4. Add another text property, and within that text property, link to another note – but internally to the text property. Make sure it’s properly delimited with double quotes, but add some text before and after the link within the text node. Observe that it is not recognized as a link. Links are only recognized if they are the entire value of the text property (they are not hyperlinked, you can’t click or right-click them, and they don’t affect the links panes).

The attached screenshots show this clearly in the sandbox vault, and the Additional Information section below explains the example and the rationale for why I expected I could do this / why it’s useful.

Did you follow the troubleshooting guide? [Y/N]

Yup, and the attached screenshots come directly from the sandbox vault in 1.4.16

Expected result

Links within text properties are recognized and hyperlinked in the Properties GUI, even if they are embedded within text. They are clickable to traverse, open, right-clickable, etc.

Also, outgoing and backlinks should recognize these as legit links.

Actual result

Links within text properties are recognized and hyperlinked in the Properties GUI -only- if they are the entire text property. See screenshot for example.

Also, outgoing and backlinks pane does not recognize links within text properties as links – unless the link takes up the entire text property node value.

Environment

SYSTEM INFO:
Obsidian version: v1.4.16
Installer version: v1.4.14
Operating system: Darwin Kernel Version 23.1.0: Mon Oct 9 21:27:27 PDT 2023; root:xnu-10002.41.9~6/RELEASE_X86_64 23.1.0
Login status: logged in
Catalyst license: insider
Insider build toggle: off
Live preview: on
Legacy editor: off
Base theme: dark
Community theme: none
Snippets enabled: 0
Restricted mode: on

RECOMMENDATIONS:
none


Additional information

For context – according to the Obsidian help page, a note’s text properties can contain links to other notes.

Text and List type properties can contain URLs and Internal links using the [[Link]] syntax.

Internal links in Text and List type properties must be surrounded with quotes. Obsidian will automatically add these if you manually enter internal links into properties, but be careful to add them when using templating plugins.

As best as I can tell, however, Text properties can only contain [[Links]] if the entire text value is the link. In other words, a Text property cannot contain a link to another note embedded within text; it can only equal that link.

I have a real use case here, where I want to be able to put a sentence into a property containing some textual context as well as a link to another note. This is really happening in my current vault.

For example, if I have notes named Sarah, Bob, and Joe – I’d like to be able to have Joe’s weMetAt property say something like “at a wedding with [[Sarah]]”. I can do that in the body of the note, but not within a text property. The text property can say “[[Sarah]]” and that works as expected: but not “at a wedding with [[Sarah]]”

Please see the attached screenshot from the Sandbox vault. I’d like to be able to say that property “howWeMet” in note “Joe” says something like “at wedding with [[Sarah]]”. Note that links are properly recognized and hyperlinked when they take up the entire text property (see e.g. property “bestFriend”, which works fine) – but that when the link is only part of the text string, it is not recognized. This is different than in the body of the note.

Note that quotes around the text property value don’t seem to make a difference.



this is not a bug. We do not support “mixing text with [[links]] in properties”.

I’ll make the docs more clear.

thanks @WhiteNoise … whether it ‘should’ be supported seems debateable, but the docs do make it sound like it should work.

Is there any particular reason why you do not support ‘mixing text with [[links]] in properties’? Would it cause problems to do so? Am I missing a downside?

Perhaps questionable whether a bug, once the docs are corrected, but I’d be happy to add as a feature request if more appropriate. It seems like there’s a legit use case for it, it would be helpful, and I couldn’t think of a downside in terms of parse-ability or other consequences. But I could well be missing something.

The issue is that it greatly increases the complexity in parsing.

Oops, @WhiteNoise I’m very sorry for the comment I just left – I completely missed the feature request to which you linked. You are right that this addresses my request already.

I’ll delete the comment, and sorry for the confusion.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.