Repository: requarks/wiki

Issue #2062: Markdown URL syntax being autocompleted by a path to another page
Created: 2020-06-15T21:15:00Z
Describe the bug
When typing the syntax for links in markdown ([name](url)), the editor keeps pasting in a path to a different page in the wiki (always the same).
More specifically this happens whenever after a closing bracket ] I type an opening parenthesis (. It does not need to be typed immediately in a sequence, for example typing a word after ], deleting it, and then typing ( produces the same result.
To Reproduce
Steps to reproduce the behavior:

Edit page in markdown
Start typink a link: [blabla]
Continue with open parenthesis [blabla](
Parenthesis immediately replaced with a path to another page and a closing parenthesis, e.g.:
[blabla]/some/other/page)

Expected behavior
Markdown editor shouldn't autocomplete link syntax with a "random" page path.
Host Info (please complete the following information):

OS: Docker on Arch linux
Wiki.js version: 2.4.107 (issue was also present in 2.3.77, not sure if before that)
Database engine: postgresql 12.1

Additional context
Additional things tested below. Issue persists even if:

tried in a different page, even created a new one (happens with any)
tried with different keyboard layout/language
tried in chrome incognito
tried in a different browser (tested Chrome and Firefox)
tried on a different PC
tried with freshly created user account
tried with all cookies deleted

When I rename (move) the /path that keeps inserting itself, the path in the unexpected "auto-completion" also changes to that.
I honestly hope that it's just something stupid, so I'd be happy to be educated that it's just something weird I somehow enabled somewhere.

Duplicate issue #2514: Markdown editor automatically selecting page when adding a new link
Created: 2020-09-29T03:11:36Z
Describe the bug
When adding a link on a page using the markdown editor, if you have a page which short description contains an open parenthesis "(" This will automatically select that page for any link you try to add making for a poor user experience.
This bug will only occur if there is one page which short description contains an open parenthesis. Adding another page which short description contains the same will remove the bug as the page selector will appear. If you then select a page from the list it will remove the open parenthesis.
To Reproduce
Steps to reproduce the behavior:

Add a page using the markdown editor. Make sure the Short Description contains an Open Parenthesis "(". Save Page.
Go to an existing page using the markdown editor (can be same page which we just created).
Add a new link my typing - [xyz](
Once you type the open parenthesis this will remove the open parenthesis and add the URL of the page which contains this description. the editor would now look something like [xyz]/path/to/page. when you then try to add another open parenthesis after the closing square brace to create a full link it will then add the /path/to/page again. This causes the page to look like [xyz]/path/to/page/path/to/page

Expected behavior
I would expect the page selector to appear with one item which is the page which contains the search values. Or not appear at all until another character is typed after the first open parenthesis.
Screenshots
https://imgur.com/a/Tjse15t
Host Info (please complete the following information):

OS: Ubuntu 20.04
Wiki.js version: 2.5.144
Database engine: postgresql 12.4
Node.JS: 14.4.0

Closing comment (2020-09-29T04:21:18Z): Duplicate of #2062