Skip to content
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

Feature: filter links in #current note #70

Open
bberberov opened this issue Oct 22, 2024 · 3 comments
Open

Feature: filter links in #current note #70

bberberov opened this issue Oct 22, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@bberberov
Copy link

I recently started using the browser extension with QOwnNotes. The #current tag feature is very nice, but it creates an all-or-nothing list of all links in the current note. It would be useful if some links could be filtered out; they are useful in the note itself, but not when viewed through the extension.

Two cases:

  • Filter out all the file:// links. A global preference would be fine.
  • Allow other tags in combination with #current. Right now other tags from the note are not usable.

Expected behaviour

Some possibility of filtering links

Actual behaviour

All links from the current note are listed

Steps to reproduce

  • Create a note with some file:// links, and some tags like #local.
  • Open current note through browser extension

Output from the debug section in the settings dialog in QOwnNotes

Relevant log output in the Log panel in QOwnNotes

@pbek
Copy link
Member

pbek commented Oct 23, 2024

Filter out all the file:// links. A global preference would be fine.

Ah, thank you. I think I will filter them out unconditionally in QOwnNotes itself. Don't make a lot of sense for portability.

Allow other tags in combination with #current. Right now other tags from the note are not usable.

Could you please explain what you mean by "Right now other tags from the note are not usable."?

I created a note with

- [file link](file:///home/user/somefile.txt) #sometag

Then I filtered by #sometag.

@pbek pbek added the enhancement New feature or request label Oct 23, 2024
@bberberov
Copy link
Author

Ah, thank you. I think I will filter them out unconditionally in QOwnNotes itself. Don't make a lot of sense for portability.

Please don't filter them out unconditionally! Firefox supports file:/// with some very useful behaviors. HTML and XML (with XSLT) files load without having to run a web server, and directories display an index page. I use them a lot and I'd rather filter them out with tags when needed.

I think I figured out the issue with the tags.

This will display the link and tag in the extension interface:

paragraph

- [file link](file:///home/user/somefile.txt) #sometag

paragraph

But this will display only the link, and not parse the tag, even if it's its own paragraph or heading:

paragraph

[file link](file:///home/user/somefile.txt) #sometag

paragraph

I didn't realize the subtlety in the syntax. Could you add a note in the documentation that tags are only parsed in lists, but links are parsed everywhere.

By the way, excellent application! Incredibly performant on older hardware. Appreciated.

@pbek
Copy link
Member

pbek commented Oct 24, 2024

But this will display only the link, and not parse the tag, even if it's its own paragraph or heading:

The "normal" bookmark links need to be in lists, see https://www.qownnotes.org/getting-started/browser-extension.html#syntax-of-bookmark-links

The 2nd link just gets picked up as a random link in a sentence, like This is a [file link2](file:///home/user/somefile2.txt) in a sentence..

By the way, excellent application! Incredibly performant on older hardware. Appreciated.

Thank you! 😉

pbek added a commit to pbek/QOwnNotes that referenced this issue Oct 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants