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

[I] Path to note in link does not change #3200

Closed
DemidovDG opened this issue Jan 1, 2025 · 25 comments
Closed

[I] Path to note in link does not change #3200

DemidovDG opened this issue Jan 1, 2025 · 25 comments
Labels

Comments

@DemidovDG
Copy link

Expected behaviour

I create a link in the note ./folder_1/note_1 to another note ./folder_2/note_2:

[note_2](../folder_2/note_2)

When moving the note ./folder_1/note_1 to a higher or lower directory, for example, to ./folder_1/subfolder_1/note_1, the link path to the note should update to ../../folder_2/note_2 to remain valid.

Actual behaviour

The link path remains unchanged: ../folder_2/note_2. As a result, the link becomes invalid and does not work.

Steps to reproduce

  1. Create two notes: ./folder_1/note_1 and ./folder_2/note_2.
  2. Add a link in the first note pointing to the second note.
  3. Move the first note to a higher or lower directory.
@pbek
Copy link
Owner

pbek commented Jan 1, 2025

That doesn't look like a correct note link.
Best use the note link dialog to see how to create a link to another Markdown note file (Ctrl + Shift + L).

@DemidovDG
Copy link
Author

Yes, I am adding the link using the shortcut Ctrl + Shift + L. I am using QOwnNotes (Portable) 24.12.7 on Windows 10

Here, I added a link to the note "Markdown Cheatsheet" located in "Notes/QOwnNotes/Welcome". The link is in a note located in "Notes/First_test".

изображение


изображение

@pbek
Copy link
Owner

pbek commented Jan 1, 2025

Do you have the same issue without portable mode?

@DemidovDG
Copy link
Author

Yes, here I tried the non-portable version. The paths in the links still look the same. And the paths do not change when moving the note to other directories.

qownnotes_test

@pbek
Copy link
Owner

pbek commented Jan 2, 2025

I just tried and can't reproduce your issue. I get a dialog that tells me that linked notes need to change...

You never shared your settings.
Do you have the same issue when running QOwnNotes in a new session (see cli-parameters)?

@DemidovDG
Copy link
Author

You never shared your settings.

My omission, I thought the issue was specifically with the logic of the code itself. Here are my settings that I used for testing (I only changed the settings related to language and translation. I don't remember touching anything more significant).

QOwnNotes Debug Information

General Info

Current Date: Чт янв 2 17:11:54 2025
Version: 24.12.7
Build date: Dec 27 2024
Build number: 1149
Platform: windows (windows)
Operating System: Windows 10 Version 1909
Build architecture: x86_64
Current architecture: x86_64
Release: GitHub Actions
Qt Version (build): 5.15.2
Qt Version (runtime): 5.15.2
Portable mode: no
Settings path / key: \HKEY_CURRENT_USER\Software\PBE\QOwnNotes
Application database path: C:\Users\admin\AppData\Roaming\PBE\QOwnNotes\QOwnNotes.sqlite
Application arguments: C:\Users\admin\programs\QOwnNotes\QOwnNotes.exe
Qt Debug: 0
Locale (system): ru_RU
Locale (interface): en
Primary screen resolution: 1920x1080
Icon theme: breeze-dark-qownnotes
Notes in current note folder: 4
Calendar items: 0
Enabled scripts: 0
Database drivers: QSQLITE, QODBC, QODBC3, QPSQL, QPSQL7

Server Info

serverUrl: empty
appIsValid: no
notesPathExists: empty
connectionErrorMessage: empty

Spellchecking

Enabled: false
Selected language: auto
Language codes: empty
Language names: empty
Application dictionaries path: C:\Users\admin\AppData\Roaming\PBE\QOwnNotes\dicts

Note folders

currentNoteFolderId: 1

Note folder My_notes

id: 1
isCurrent: yes
activeTagId: -2
localPath: C:\Users\admin\Notes
remotePath: Notes
cloudConnectionId: 1
isShowSubfolders: yes
isUseGit: no
allowDifferentNoteFileName: yes
activeNoteSubFolder name: folder_1
database file: C:\Users\admin\Notes\notes.sqlite

Cloud connections

Cloud connection По умолчанию

id: 1
isCurrent: yes
serverUrl: empty
username: empty
accountId: empty

Enabled scripts

Settings

ActiveNoteHistoryItem (NoteHistoryItem): <binary data>
Debug/fakeOldVersionNumber (QString): false
Debug/fileLogging: empty
Editor/CurrentSchemaKey (QString): EditorColorSchema-2f30b571-9e15-4762-8ed9-7f2c6862e934
Editor/autoBracketClosing (QString): true
Editor/autoBracketRemoval (QString): true
Editor/disableCursorBlinking (QString): false
Editor/editorWidthInDFMOnly (QString): true
Editor/highlightCurrentLine (QString): true
Editor/indentSize (int): 4
Editor/removeTrailingSpaces (QString): false
Editor/showLineNumbers (QString): false
Editor/useTabIndent (QString): false
Editor/vimMode (QString): false
LastUpdateCheck (QDateTime): 2025-01-02T17:10:41.156
LinkDialog/geometry (QByteArray): <binary data>
MainWindow/geometry (QByteArray): <binary data>
MainWindow/mainToolBar.iconSize (int): 30
MainWindow/menuBarGeometry (QByteArray): <binary data>
MainWindow/noteSubFolderTreeWidgetExpandState-1 (QStringList): folder_1
MainWindow/noteTextEdit.code.font (QString): Courier New,13,-1,2,50,0,0,0,0,0
MainWindow/noteTextEdit.font (QString): MS Shell Dlg 2,12,-1,5,50,0,0,0,0,0
MainWindow/noteTextView.code.font (QString): Courier New,9,-1,2,50,0,0,0,0,0
MainWindow/noteTextView.font (QString): MS Shell Dlg 2,7.8,-1,5,50,0,0,0,0,0
MainWindow/noteTextView.ignoreCodeFontSize (QString): true
MainWindow/noteTextView.refreshDebounceTime (int): 600
MainWindow/noteTextView.rtl (QString): false
MainWindow/noteTextView.underline (QString): false
MainWindow/noteTextView.useEditorStyles (QString): true
MainWindow/noteTextView.useInternalExportStyling (QString): true
MainWindow/showNotesFromAllNoteSubFolders (QString): false
NoteFolder-1/NoteTabNameList (QStringList): note_1
NoteFolder-1/NoteTabStickinessList (QStringList): empty
NoteFolder-1/NoteTabSubFolderPathDataList (QStringList): folder_1
NoteFolder-1/allowDifferentNoteFileName (bool): true
NoteHistory-1 (QVariantList): <variant list with 6 item(s)>
NoteHistoryCurrentIndex-1 (int): 4
PiwikClientId (QString): <hidden>
SearchEngineId (int): 2
SettingsDialog/geometry (QByteArray): <binary data>
SettingsDialog/mainSplitterState (QByteArray): <binary data>
ShowSystemTray (QString): false
StartHidden (QString): false
WelcomeDialog/geometry (QByteArray): <binary data>
acceptAllExternalModifications (QString): false
ai/groq/apiKey (QString): <hidden>
ai/openai/apiKey (QString): <hidden>
allowNoteEditing (bool): true
allowOnlyOneAppInstance (QString): true
appMetrics/disableAppHeartbeat (QString): true
appMetrics/disableTracking (QString): true
appMetrics/notificationShown (QString): true
autoReadOnlyMode (QString): false
autoReadOnlyModeTimeout (int): 30
automaticNoteFolderDatabaseClosing (QString): false
checkSpelling (bool): false
closeTodoListAfterSave (QString): false
cryptoKey (qlonglong): <hidden>
currentNoteFolderId (int): 1
currentWorkspace (QString): initial
cursorWidth (int): 1
darkMode (QString): true
darkModeColors (QString): true
darkModeIconTheme (QString): true
darkModeTrayIcon (QString): false
defaultNoteFileExtension (QString): md
demoNotesCreated (QString): true
disableAutomaticUpdateDialog (QString): true
disableSavedSearchesAutoCompletion (QString): false
dockWasInitializedOnce (QString): true
enableNoteTree (QString): false
enableSocketServer (QString): true
enableWebAppSupport (QString): false
externalEditorPath (QString): empty
fullyHighlightedBlockquotes (QString): false
gitCommitInterval (int): 30
gitExecutablePath (QString): empty
gitLogCommand (QString): empty
guiFirstRunInit (bool): true
ignoreAllExternalModifications (QString): false
ignoreAllExternalNoteFolderChanges (QString): false
ignoreNoteSubFolders (QString): ^\.
ignoredNoteFiles (QString): empty
imageScaleDown (QString): false
imageScaleDownMaximumHeight (int): 1024
imageScaleDownMaximumWidth (int): 1024
initialLayoutIdentifier (QString): full
insertTimeFormat (QString): empty
interfaceFontSize (int): 11
interfaceLanguage (QString): en
interfaceStyle (QString): Fusion
internalIconTheme (QString): false
itemHeight (int): 18
legacyLinking (QString): false
localTrash/autoCleanupDays (int): 30
localTrash/autoCleanupEnabled (QString): true
localTrash/supportEnabled (QString): true
markdownHighlightingEnabled (QString): true
maxNoteFileSize (int): 1048576
navigationPanelAutoSelect (QString): true
navigationPanelHideSearch (QString): false
networking/ignoreSSLErrors (QString): false
networking/proxyType (int): 2
newNoteAskHeadline (QString): false
noteEditIsCentralWidget (QString): true
noteFileExtensionList (QStringList): md, txt
noteListPreview (QString): false
noteSaveIntervalTime (int): 10
noteSubfoldersPanelDisplayAsFullTree (QString): true
noteSubfoldersPanelHideSearch (QString): false
noteSubfoldersPanelOrder (int): 0
noteSubfoldersPanelShowFullPath (QString): false
noteSubfoldersPanelShowNotesRecursively (QString): false
noteSubfoldersPanelShowRootFolderName (QString): true
noteSubfoldersPanelSort (int): 1
noteSubfoldersPanelTabsUnsetAllNotesSelection (QString): false
notesPanelOrder (int): 1
notesPanelSort (int): 1
notesPath (QString): C:/Users/admin/Notes
notifyAllExternalModifications (QString): false
overrideInterfaceFontSize (QString): false
ownCloud/supportEnabled (QString): false
ownCloud/todoCalendarBackend (int): 3
ownCloud/todoCalendarCalDAVPassword (QString): <hidden>
ownCloud/todoCalendarCalDAVServerUrl (QString): empty
ownCloud/todoCalendarCalDAVUsername (QString): empty
ownCloud/todoCalendarCloudConnectionId (int): 1
ownCloud/todoCalendarDisplayNameList (QStringList): empty
ownCloud/todoCalendarEnabledList (QStringList): empty
ownCloud/todoCalendarEnabledUrlList (QStringList): empty
ownCloud/todoCalendarUrlList (QStringList): empty
ownCloudInfo/appIsValid (bool): false
ownCloudInfo/connectionErrorMessage (QString): empty
ownCloudInfo/notesPathExistsText (QString): empty
ownCloudInfo/serverVersion (QString): empty
restoreCursorPosition (QString): true
restoreLastNoteAtStartup (QString): true
restoreNoteTabs (QString): true
savedSearches/noteFolder-1 (QStringList): Note 2025-01-02T15.18.31, Note 2025-01-02T15.17.21
showMatches (QString): true
showMenuBar (bool): true
showStatusBar (bool): true
showStatusBarNotePath (QString): true
showStatusBarRelativeNotePath (QString): false
startInReadOnlyMode (QString): false
systemIconTheme (QString): false
taggingShowNotesRecursively (QString): false
tagsPanelHideNoteCount (QString): false
tagsPanelHideSearch (QString): false
tagsPanelOrder (int): 0
tagsPanelSort (int): 0
todoCalendarSupport (QString): true
toolbar/1/items (QStringList): actionFormat_text_bold, actionFormat_text_italic, actionStrike_out_text, actionInsert_code_block, actionInsert_block_quote
toolbar/1/name (QString): formattingToolbar
toolbar/1/title (QString): formatting toolbar
toolbar/2/items (QStringList): actionInsert_text_link, actionInsert_image, actionInsert_current_time
toolbar/2/name (QString): insertingToolbar
toolbar/2/title (QString): inserting toolbar
toolbar/3/items (QStringList): action_Encrypt_note, actionEdit_encrypted_note, actionDecrypt_note
toolbar/3/name (QString): encryptionToolbar
toolbar/3/title (QString): encryption toolbar
toolbar/4/items (QStringList): actionEnable_AI, actionAiBackendComboBox, actionAiModelComboBox
toolbar/4/name (QString): aiToolbar
toolbar/4/title (QString): AI toolbar
toolbar/5/items (QStringList): actionWorkspaceComboBox, actionStore_as_new_workspace, actionRemove_current_workspace, actionRename_current_workspace, actionSwitch_to_previous_workspace, actionUnlock_panels, , actionToggle_distraction_free_mode, action_Increase_note_text_size, action_Decrease_note_text_size, action_Reset_note_text_size
toolbar/5/name (QString): windowToolbar
toolbar/5/title (QString): window toolbar
toolbar/6/items (QStringList): action_Quit
toolbar/6/name (QString): quitToolbar
toolbar/6/title (QString): quit toolbar
toolbar/7/items (QStringList): action_Quit
toolbar/7/name (QString): quitToolbar
toolbar/7/title (QString): quit toolbar
toolbar/size (int): 7
useNoteFolderButtons (QString): false
useUNIXNewline (QString): false
webAppClientService/serverUrl (QString): wss://app.qownnotes.org
webAppClientService/token (QString): <hidden>
webSocketServerService/bookmarksNoteName (QString): empty
webSocketServerService/bookmarksTag (QString): bookmarks
webSocketServerService/commandSnippetsNoteName (QString): Commands
webSocketServerService/commandSnippetsTag (QString): commands
webSocketServerService/port (int): 22222
workspace-initial/name (QString): Full
workspace-initial/noteSubFolderDockWidgetVisible (QString): true
workspace-initial/windowState (QByteArray): <binary data>
workspaces (QStringList): initial

System environment

ALLUSERSPROFILE: C:\ProgramData
APPDATA: C:\Users\admin\AppData\Roaming
CommonProgramFiles: C:\Program Files\Common Files
CommonProgramFiles(x86): C:\Program Files (x86)\Common Files
CommonProgramW6432: C:\Program Files\Common Files
COMPUTERNAME: DESKTOP-D3BB1MV
ComSpec: C:\Windows\system32\cmd.exe
DriverData: C:\Windows\System32\Drivers\DriverData
HOMEDRIVE: C:
HOMEPATH: \Users\admin
LOCALAPPDATA: C:\Users\admin\AppData\Local
LOGONSERVER: \\DESKTOP-D3BB1MV
NUMBER_OF_PROCESSORS: 4
OS: Windows_NT
Path: C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Users\admin\AppData\Local\Microsoft\WindowsApps;
PATHEXT: .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
PROCESSOR_ARCHITECTURE: AMD64
PROCESSOR_IDENTIFIER: Intel64 Family 6 Model 142 Stepping 10, GenuineIntel
PROCESSOR_LEVEL: 6
PROCESSOR_REVISION: 8e0a
ProgramData: C:\ProgramData
ProgramFiles: C:\Program Files
ProgramFiles(x86): C:\Program Files (x86)
ProgramW6432: C:\Program Files
PSModulePath: C:\Program Files\WindowsPowerShell\Modules;C:\Windows\system32\WindowsPowerShell\v1.0\Modules
PUBLIC: C:\Users\Public
SESSIONNAME: Console
SystemDrive: C:
SystemRoot: C:\Windows
TEMP: C:\Users\admin\AppData\Local\Temp
TMP: C:\Users\admin\AppData\Local\Temp
USERDOMAIN: DESKTOP-D3BB1MV
USERDOMAIN_ROAMINGPROFILE: DESKTOP-D3BB1MV
USERNAME: admin
USERPROFILE: C:\Users\admin
windir: C:\Windows


Do you have the same issue when running QOwnNotes in a new session (see cli-parameters)?

Yes, I also checked this with a clean session:

QOwnNotes --session test

@DemidovDG
Copy link
Author

I get a dialog that tells me that linked notes need to change...

I get this dialog window when I move note_2. However, when moving the note note_1, the dialog window does not appear.

I also tested this on Debian 12, and the behavior is the same.


It seems a bit convoluted to describe, but I hope you understand me. 😄

I also tried other options:

изображение

If I try to insert a link to the note as a regular file using file://, the situation becomes the opposite. Now, when moving note_1, the link to note_2 remains valid (because the path doesn't change). However, when moving note_2, the dialog window that should appear doesn't show up, and the link's path isn't updated. As a result, the link becomes invalid.

изображение

If I try to create a link using note://, everything works correctly during moves, and the link remains functional. However, there's another issue. When using note://, only the note's name is included, such as note://note_2, regardless of the subdirectory it is in. This creates a situation where I might have two notes with the same name in different subdirectories, for example, ./windows/bugs_note and ./linux/bugs_note. In this case, the link note://bugs_note will always point to one of these notes, and it won't be possible to specify which one I intended to reference.

изображение

@pbek
Copy link
Owner

pbek commented Jan 2, 2025

Ah, I see now. Currently, the mechanism only supports looking for notes that are linking to the moved note, not the other way around. This use case was more important, because you may not know anymore what linked to your note (meanwhile, you can also show the backlinks to notes). Would be a nice addition tho...

const QVector<int> noteIdList = oldNote.findLinkedNoteIds();

@pbek pbek added Importance: Medium Type: Improvement improves existing functionality and removed Type: Support labels Jan 2, 2025
@DemidovDG
Copy link
Author

I did some additional testing with different usage scenarios related to links and notes. I decided not to create another issue, as I think these are all part of the same problem: "broken links due to various actions with paths and notes".

To summarize, the link remains valid if:

  • ✔️ note_2 is moved
  • ✖️ note_1 is moved

It's also important to mention that if note_1 is moved first and then note_2 is moved, the mechanism will no longer work because the connection is already lost.

  • ✔️ note_2 is renamed
  • ✖️ Any directory in the path to note_2 is renamed

When a directory in the note's path is changed

qownnotes_test_2


Additionally, I wanted to mention that when note_2 is deleted, nothing happens. I think it would be helpful if a dialog window appeared before deleting the note, informing the user that there are still links pointing to it.

@pbek
Copy link
Owner

pbek commented Jan 2, 2025

It's also important to mention that if note_1 is moved first and then note_2 is moved, the mechanism will no longer work because the connection is already lost.

Yes, of course. There is no connection anymore.

Additionally, I wanted to mention that when note_2 is deleted, nothing happens. I think it would be helpful if a dialog window appeared before deleting the note, informing the user that there are still links pointing to it.

Currently, you can do that with the backlink panel.
You can create another feature request.

@netlimpopo
Copy link

netlimpopo commented Jan 12, 2025

Limits of QN

I tried hours of testing in QN, in which cases Markdown links will break and tried to memorize those cases. I use QN 97% of the time and I think QN is terrific and very userfriedly, I love it.
Having said that, automatic link updates ist a tremendously useful but missing feature for those cornercases, that's why I regularily fall back to VS Codium when I refactor my folders.

Correctly Updating standard markdown links is rare among editors

Updating standard markdown links is a very very tough puzzle. I've tried a view editors and currently only 2 editors are capable of it.

  1. VS Codium received this update only recently 7 years after VS Codium had been launched (2022): Youtube: VS Codium automatic link updates
    Renaming Folders, files, and moving files is now possible.

  2. One highly specialised Obsidian Plugin can also do the link update trick:
    Note!!: Not even vanilla Obsidian can update standard md links correctly out of the box!: There has been a feature request for that for 4 years and an open bug report: https://forum.obsidian.md/t/broken-links-in-relative-path-mode-on-move-rename/4386/34, https://forum.obsidian.md/t/add-settings-to-control-link-resolution-mode/69560!

Community-Plugin: "Obsidian-consistent-attachments-and-links"

Regex to correct links from VS Codium

Disadvantage: VS Codium transforms [Link](Link%20with%20spaces.md) to [Link](<Link with spaces.md>). In the preview panel QN doesn't display those types perfectly, so I remove <> and replace spaces with %20 afterwards.
(Currently I use a Notepad++ Macro and Regex: (\G(?!\A)|\[[^][]*]\()([^()\s]*)\s+(?=[^()]*\)) or VS Codium Regex: (?<=\]\([^\]]*)\s+(?=[^()]*\))).

Alternatively I am thinking about writing a script in QN that updates the corrects the links, so QN and VS Codium work together (I only know a tiny bit of programming though).

Community support needed

VS Feature Request
Please give my feature request on VS Codium a thumb up, so it will be taggled, so VS Codium will be more compatible with QN

@pbek
Copy link
Owner

pbek commented Jan 13, 2025

[Link](<Link with spaces.md>)

Is there any documentation about those links? I haven't seen them anywhere...

@netlimpopo
Copy link

netlimpopo commented Jan 13, 2025

VS Codium update April 2022:

Before 2022-04 VS Codium didn't support those links at all (and neither did they support spaces in file names properly). From then on they went "all-in" and on every refactor md links have been changing to angle bracket links strangely. Maybe this was the way to solve the refactoring puzzle, no idea? See: Properly support commonmark angle bracket syntax in links #148818 and also Improper parsing of commonmark link-destination #136073.

Official commonmark-specification

I thought those "angle bracket links" are wrong and asked VS Code developers to properly URL encode the links again. They told me it was an official commonmark specification:
https://spec.commonmark.org/0.29/#example-486. and my feature request / discussion: Format markdown links containing space in filename [](<>) without greater and smaller sign and maintain URL encoding #235422.

Obsidian Plugin implementing angle bracket links

Funnily enough there is even an Obsidian-Plugin which deliberatly changes all links to angle bracket links to make them more readable to the user and also manages link refactoring correctly: https://www.obsidianstats.com/plugins/better-markdown-links. (it's part of the same group of plugins from the same author I mentioned in my previous post).

Conclusion

I don't know if angle bracket links came to stay or if other note taking apps will focus on "URL-encoded" links more again. Nevertheless it seems to be an official commonmark specification. So displaying them I guess would not be a totally bad idea.

Moreover the current logic of the file renaming and refactoring of QN would be affected as well. No idea how much this would break :-/.

Like I said, I currently do a RegEx on all files as a workaround to avoid the topic. I need to have a look at the RegEx Specialtities of QN, as RegEx's of differnent programmes and languages in general often differ to what they support.

@pbek
Copy link
Owner

pbek commented Jan 13, 2025

https://spec.commonmark.org/0.29/#example-486

So it's a commonmark "spec". It looks so awkward...

@netlimpopo
Copy link

grafik
grafik

I will test renaming and refactoring with angle brackets and report back, if there are any actual issues in QN.
I mainly had issues with the preview and I think a static site builder.

@pbek
Copy link
Owner

pbek commented Jan 13, 2025

QOwnNotes never supported commonmark (in most cases)...

@pbek
Copy link
Owner

pbek commented Jan 13, 2025

But this feature request is about supporting re-writing of outgoing note links too.

pbek added a commit that referenced this issue Jan 13, 2025
pbek added a commit that referenced this issue Jan 14, 2025
pbek added a commit that referenced this issue Jan 15, 2025
pbek added a commit that referenced this issue Jan 16, 2025
pbek added a commit that referenced this issue Jan 17, 2025
pbek added a commit that referenced this issue Jan 17, 2025
pbek added a commit that referenced this issue Jan 17, 2025
Signed-off-by: Patrizio Bekerle <[email protected]>
pbek added a commit that referenced this issue Jan 19, 2025
pbek added a commit that referenced this issue Jan 19, 2025
pbek added a commit that referenced this issue Jan 21, 2025
pbek added a commit that referenced this issue Jan 21, 2025
Signed-off-by: Patrizio Bekerle <[email protected]>
@pbek
Copy link
Owner

pbek commented Jan 21, 2025

This was a huge amount of work, much more than I expected... 😬 Fixed an issue along the way...

25.1.5

  • After moving a note to a new subfolder, outgoing links to other notes can now be
    automatically adapted (for #3200)

25.1.4

  • An issue was fixed where some links to a note were not adapted when the note was
    moved or renamed (for #3200)

@pbek
Copy link
Owner

pbek commented Jan 21, 2025

There now is a new release, could you please test it and report if it works for you?

@pbek pbek closed this as completed Jan 25, 2025
@DemidovDG
Copy link
Author

I understand well when a seemingly simple task becomes really huge...

Indeed, now the links are saved whenever you move notes. And that's great, thanks!

  • ✔️ note_2 is moved
  • ✔️ note_1 is moved
  • ✔️ note_2 is renamed

There was only one moment left, which I also wrote about above, when the name of the subdirectory in which note_2 was located was changed.

When a directory in the note's path is changed

  • ✖️ Any directory in the path to note_2 is renamed

@pbek
Copy link
Owner

pbek commented Jan 25, 2025

There currently are no actions for sub directory renaming, can you please create a new feature request?

@netlimpopo
Copy link

Changed Behaviour

So far outgoing links created with QN work fine! Great job!

Angle Bracket Links

Angle Bracket links <Link%20withAngle%20Brackets.md> and also <Link withAngle Brackets.md> now also get recognised and updated and url encoded. Awesome, this is a big step towards compatibility with other markdown programmes! Thank you a lot!

New Bug/Regression in Preview panel?:

Image

Now there is standard link preview for angle bracket links in the preview panel, but those links are not clickable anymore (does not take one anywhere)

Old Behaviour in Preview panel for comparism:
Image

New Behaviour upon link updates for heading links

When moving a file (back and forth) with a heading and an angle bracket link, the brackets<> will be removed.

[File 2 - H 2 in F2](<Folder%202/File%202.md#H%202%20in%20F2>) will be changed to
[File 2 - H 2 in F2](Folder%202/File%202.md#H%202%20in%20F2)

Angle Bracket links are not a focus of QN. This PR has implemented a lot of features! Thank you a lot for that!
It's a big step towards further compatibility!
I will also prepare another discussion/issue and maybe idea for a script to further improve compatibility with other markdown editors!

@pbek
Copy link
Owner

pbek commented Jan 30, 2025

[File 2 - H 2 in F2](<Folder%202/File%202.md#H%202%20in%20F2>)

What did you try to do with the brackets? You used a link in a link.

@netlimpopo
Copy link

netlimpopo commented Jan 30, 2025

[File 2 - H 2 in F2](<Folder%202/File%202.md#H%202%20in%20F2>)

What did you try to do with the brackets? You used a link in a link.

These Links were provided by VSCODIUM and Obsidian (with the Plug-In: "Better Markdown Links"), whenever I moved files and update the links.
In VS Codium Links get changed to : [File 2 - H 2 in F2](<Folder 2/File 2.md#H 2 in F2>)
They are also commonmark-link which I mentioned the other day in Comment about Angle Bracket links from Commonmark.

@pbek
Copy link
Owner

pbek commented Jan 30, 2025

I learned something new today. 😊
QOwnNotes doesn't really support such links.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants