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

Markdown URL syntax being autocompleted by a path to another page #2062

Closed
pavemina opened this issue Jun 15, 2020 · 4 comments
Closed

Markdown URL syntax being autocompleted by a path to another page #2062

pavemina opened this issue Jun 15, 2020 · 4 comments
Assignees
Labels
under review Acknowledged, awaiting further review

Comments

@pavemina
Copy link

pavemina commented Jun 15, 2020

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:

  1. Edit page in markdown
  2. Start typink a link: [blabla]
  3. Continue with open parenthesis [blabla](
  4. 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.

@rudesome
Copy link
Contributor

got same issue here

@greenitthe
Copy link

greenitthe commented Sep 12, 2020

Same issue. Generates links like "[example]/home)", which in my case is my ID 1 page.

OS: Linux - Ubuntu (bionic) 18.04 x64
Wiki JS: 2.5.132
Node: 12.18.3
Database engine: PostgreSQL 10.14

Seems to be an issue in the autocomplete function of markdown editor. The Apollo query seems to be malfunctioning. It could also be that query is functioning correctly but the query variable it is meant to be passed is malformed. Presently the token string that constitutes this variable is always "(". I don't have enough experience with this toolset to tell what it should be offhand and I can't play with it because of #2426.

@NGPixel NGPixel added the under review Acknowledged, awaiting further review label Sep 13, 2020
greenitthe pushed a commit to brct-james/wiki that referenced this issue Sep 14, 2020
Fix for requarks#2062. Using token.string only captured the character at the cursor. Now using the cursor location to determine suitable search text. Also corrected syntax issue where suggestion removed opening link parenthesis.
NGPixel pushed a commit that referenced this issue Sep 19, 2020
Fix for #2062. Using token.string only captured the character at the cursor. Now using the cursor location to determine suitable search text. Also corrected syntax issue where suggestion removed opening link parenthesis.
@peteruithoven
Copy link

If I understand it this was fixed in #2452 right? So this one could be closed?

@NGPixel
Copy link
Member

NGPixel commented Oct 3, 2020

Correct

@NGPixel NGPixel closed this as completed Oct 3, 2020
jionggyu pushed a commit to jionggyu/wiki-2.5.302-patch that referenced this issue Jul 9, 2024
Fix for requarks#2062. Using token.string only captured the character at the cursor. Now using the cursor location to determine suitable search text. Also corrected syntax issue where suggestion removed opening link parenthesis.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
under review Acknowledged, awaiting further review
Projects
None yet
Development

No branches or pull requests

5 participants