Closed pihentagy closed 4 years ago
I cannot reproduce that.
Can you please explain in more detail and step by step what you did, what happened and what you expected.
Relevant log output in the Log panel
and please post the log output (see issue template), there must be an error message
I will close this issue until there is more information.
See this recording:
I see you are using many scripts that alter the preview...
Maybe you want to take a closer look at Markdown-it markdown parser
.
Yep, you are right, markdown-it breaks it. However, shouldn't spaces and some other characters be escaped in the link target for maximum compatibility with other markdown tools? Or am I missing something?
They are not escaped for compatibility to all other systems. :laughing: (#266) Previously we had the "note links" with, you can still use them by turning on "Legacy linking" in the General settings.
Maybe there are some markdown-it options to help with those spaces... Or you try to parse links yourself first...
They are not escaped for compatibility to all other systems. laughing (#266) Previously we had the "note links" with, you can still use them by turning on "Legacy linking" in the General settings.
Perfect! Legacy linking solves it.
[edit]: I realized I didn't understand correctly. Non-legacy is standard complient, as it should be)
To enable smoother data exchange, shouldn't be the Legacy linking the default? And "Standard compliant linkink" sounds more positive :wink:
Btw shouldn't legacy linking not use note://
prefix? :thinking:
To enable smoother data exchange, shouldn't be the Legacy linking the default? And "Standard compliant linkink" sounds more positive wink
Legacy linking is not "standard compliant", it uses note://
and media://
links
Btw shouldn't legacy linking not use note:// prefix? thinking
it does use the note://
prefix, doesn't it?
it does use the
note://
prefix, doesn't it?
Yes it does. I mean: how can I achieve, that "standard" markdown links are created?
So, when I have 2 files: one thing.md
and other thing.md
, and I'd like to reference one from another, I should get something like: [other thing](other%20thing.md)
, so:
This way it works with any other tool (like gitlab, for eg.)
I've never seen escaped spaces in markdown links. Is there any documentation about this? Or "one standard"? I've now also seen  
for a space. :grimacing:
GitHub needs escaping of spaces and can handle both types of escaping... So I guess I will re-implement everything. 😑
I guess URLs should be escaped like in html. Markdown does not have an official documentation, "informal specification" see https://en.wikipedia.org/wiki/Markdown#cite_note-18
There are Markdown extensions, which may be better specified and documented, referenced in the wikipedia page.
Note with one bracket].md
will now get Note%20with%20one%20bracket%5D.md
 
as spacesThere now is a new release, could you please test it and report if it works for you?
Thanks, seems to work fine :+1:
Great, thank you for testing!
However #313 will re-occur if you rename a note with spaces in it.
Thank you for reporting.
There now is a new release, could you please test it and report if it works for you?
There now is a new release, could you please test it and report if it works for you?
Thanks works, that was real quick! Awesome how passionate you are!
😄 Great, thank you for testing!
With the markdown-it parser turned on, links even without spaces does not work. Switching off markdown-it instantly solves the problem.
A single
Link to [note](note.md)
does not work. v 20.3.1
May I ask what do you need from the markdown-it library that doesn't work in QOwnNotes directly?
If you are asking for a feature requests for a script please open an issue in the script's repository.
But I don't think anyone will implement those links into markdown-it very easily... Best stay at legacy links that have real urls if you really want markdown-it.
May I ask what do you need from the markdown-it library that doesn't work in QOwnNotes directly?
If you are asking for a feature requests for a script please open an issue in the script's repository.
Definition list was one of the features which are not supported with the builtin renderer. Yes, if the builtin one can parse various markdown dialect, I wouldn't experiment with markdown-it at all.
Expected behaviour
This should work:
Other note
You can link to [markdown test](markdown test.md).
Now what?
Actual behaviour
Link not detected.
Steps to reproduce
Space in the URL
Relevant log output in the Log panel
Expand
``` not important ```Information about the application, settings and environment
Expand
QOwnNotes Debug Information =========================== ## General Info **Current Date**: `Sat Jan 4 16:17:44 2020` **Version**: `20.1.2` **Build date**: `Jan 3 2020` **Build number**: `649` **Platform**: `linux` **Operating System**: `Linux Mint 19.3` **Build architecture**: `x86_64` **Current architecture**: `x86_64` **Release**: `Launchpad PPA` **Qt Version (build)**: `5.9.5` **Qt Version (runtime)**: `5.9.5` **Portable mode**: `no` **Settings path / key**: `/home/pihentagy/.config/PBE/QOwnNotes.conf` **Application database path**: `/home/pihentagy/.local/share/PBE/QOwnNotes/QOwnNotes.sqlite` **Application arguments**: `/usr/bin/QOwnNotes` **Qt Debug**: `0` **Locale (system)**: `en_US` **Locale (interface)**: *empty* **Primary screen resolution**: `1920x1080` **Icon theme**: `Mint-Y` **Notes in current note folder**: `13` **Calendar items**: `0` **Enabled scripts**: `6` ## Server Info **serverUrl**: *empty* **appIsValid**: `no` **notesPathExists**: *empty* **connectionErrorMessage**: *empty* ## Spellchecking **Enabled**: `true` **Selected language**: `auto` **Language codes**: `de_AT, de_AT_frami, de_CH, de_CH_frami, de_DE, de_DE_frami, en_AU, en_CA, en_GB, en_US, en_ZA, es_AR, es_BO, es_CL, es_CO, es_CR, es_CU, es_DO, es_EC, es_ES, es_GT, es_HN, es_MX, es_NI, es_PA, es_PE, es_PR, es_PY, es_SV, es_US, es_UY, es_VE, fr, fr_BE, fr_CA, fr_CH, fr_FR, fr_LU, fr_MC, it_CH, it_IT, pt_BR, pt_PT, ru_RU` **Language names**: `Österreichisches Deutsch (Österreich), Österreichisches Deutsch (Österreich), Schweizer Hochdeutsch (Schweiz), Schweizer Hochdeutsch (Schweiz), Deutsch (Deutschland), Deutsch (Deutschland), Australian English (Australia), Canadian English (Canada), British English (United Kingdom), American English (United States), English (South Africa), español (Argentina), español (Bolivia), español (Chile), español (Colombia), español (Costa Rica), español (Cuba), español (República Dominicana), español (Ecuador), español de España (España), español (Guatemala), español (Honduras), español de México (México), español (Nicaragua), español (Panamá), español (Perú), español (Puerto Rico), español (Paraguay), español (El Salvador), español (Estados Unidos), español (Uruguay), español (Venezuela), français, français (Belgique), français canadien (Canada), français suisse (Suisse), français (France), français (Luxembourg), français (Monaco), italiano (Svizzera), italiano (Italia), português do Brasil (Brasil), português europeu (Portugal), русский (Россия)` **Application dictionaries path**: `/home/pihentagy/.local/share/PBE/QOwnNotes/dicts` ## Note folders **currentNoteFolderId**: `1` ### Note folder `default` **id**: `1` **isCurrent**: `yes` **activeTagId**: `-1` **localPath**: `/home/pihentagy/Notes` **remotePath**: `Notes` **cloudConnectionId**: `1` **isShowSubfolders**: `yes` **isUseGit**: `yes` **activeNoteSubFolder name**: `Markdown editor` **database file**: `/home/pihentagy/Notes/notes.sqlite` ## Cloud connections ### Cloud connection `Default` **id**: `1` **isCurrent**: `yes` **serverUrl**: *empty* **username**: *empty* ## Enabled scripts ### Script `Epsilon Notes compatible tags (YAML tags)` **id**: `1` **path**: `/home/pihentagy/.local/share/PBE/QOwnNotes/scripts/epsilon-notes-tags/epsilon-notes-tags.qml` **variablesJson**: *empty* **identifier**: `epsilon-notes-tags` **version**: `0.0.2` **minAppVersion**: `18.03.7` ### Script `Unique note id` **id**: `2` **path**: `/home/pihentagy/.local/share/PBE/QOwnNotes/scripts/unique-note-id/unique-note-id.qml` **variablesJson**: *empty* **identifier**: `unique-note-id` **version**: `1.0.1` **minAppVersion**: `18.05.1` ### Script `Markdown-it markdown parser` **id**: `5` **path**: `/home/pihentagy/.local/share/PBE/QOwnNotes/scripts/markdown-it/markdown-it.qml` **variablesJson**: ``` { "customStylesheet": "", "options": "{\n //html: false, // Enable HTML tags in source\n //xhtmlOut: false, // Use '/' to close single tags ()\n //breaks: false, // Convert '\\n' in paragraphs into
\n //langPrefix: 'language-', // CSS language prefix for fenced blocks\n //linkify: false, // autoconvert URL-like texts to links\n\n // Enable some language-neutral replacements + quotes beautification\n //typographer: false,\n\n // Double + single quotes replacement pairs, when typographer enabled,\n // and smartquotes on. Could be either a String or an Array.\n //\n // For example, you can use '«»„“' for Russian, '„“‚‘' for German,\n // and ['«\\xA0', '\\xA0»', '‹\\xA0', '\\xA0›'] for French (including nbsp).\n //quotes: '\\u201c\\u201d\\u2018\\u2019', /* “”‘’ */\n\n // Highlighter function. Should return escaped HTML,\n // or '' if the source string is not changed and should be escaped externaly.\n // If result starts with