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

Links with trailing brackets don't get linkified correctly #1512

Closed
matrixbot opened this issue May 13, 2016 · 2 comments
Closed

Links with trailing brackets don't get linkified correctly #1512

matrixbot opened this issue May 13, 2016 · 2 comments
Labels
P2 S-Minor Impairs non-critical functionality or suitable workarounds exist T-Defect
Milestone

Comments

@matrixbot
Copy link

Created by @ matthew:matrix.org.

@ara4n ara4n changed the title Links with trailing brackets don't get linkified correctly https://vector.im/develop/#/room/#vector:matrix.org/$1463155004372161mlQnU:matrix.org Links with trailing brackets don't get linkified correctly May 24, 2016
@ara4n
Copy link
Member

ara4n commented May 24, 2016

@ara4n ara4n added T-Defect P2 S-Minor Impairs non-critical functionality or suitable workarounds exist labels May 24, 2016
@ara4n ara4n added this to the v3 - GA milestone May 24, 2016
@dbkr
Copy link
Member

dbkr commented Sep 22, 2016

Annoyingly, the linkifier we use handles these perfectly (or at least it does in the latest version). The links are mangled when sending by our markdown library which is detecting bare links (part of the it's 'gfm' behaviour).

Options for fixing this are:

  1. Prevent the markdown library from linkifying bare links. Safest, will require setting a rule on the lexer and invoking the marked lexer and parser separately, as they don't expose this as an option. Markdown style urls ending in brackets will still be broken. We'd only have one thing in vector doing linkifying though.
  2. Cease supporting links in markdown at all and strip markdown style links to just the URL (ie. Google would just be turned into 'http://google.com'. This is actually easiest as marked exposes api for it (override the link function).
  3. Try & find a different markdown library that gets link parsing right and hope it doesn't break whatever umpteen other things it turns out we've been relying on. Still have two things in the codebase that do linkification.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P2 S-Minor Impairs non-critical functionality or suitable workarounds exist T-Defect
Projects
None yet
Development

No branches or pull requests

3 participants