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

Fix @link matcher #13

Open
afilina opened this issue Mar 25, 2021 · 2 comments · May be fixed by #16
Open

Fix @link matcher #13

afilina opened this issue Mar 25, 2021 · 2 comments · May be fixed by #16
Assignees

Comments

@afilina
Copy link
Sponsor Collaborator

afilina commented Mar 25, 2021

Currently, the @link matcher fails on any value that includes newlines or anything after the URL. Make it more permissive.

@afilina
Copy link
Sponsor Collaborator Author

afilina commented Mar 29, 2021

There are two possible solutions:

  1. If there is anything after the URL, we treat it as the name of the link. So @link https://www.php.net/language.constants.predefined PHP Manual on magic constants will become [PHP Manual on magic constants](https://www.php.net/language.constants.predefined).
  2. We ignore everything after the URL, so @link https://www.php.net/language.constants.predefined PHP Manual on magic constants will become [https://www.php.net/language.constants.predefined](https://www.php.net/language.constants.predefined).

I have a working implementation for option number 1, if we decide to go that route. We'd need to fix two @link tags in PHPCompatibility, which use parentheses. Example: @link https://wiki.php.net/rfc/horizontalreuse (traits)

@jrfnl
Copy link
Member

jrfnl commented Mar 29, 2021

Based on the (un)official docs, the first solution would be the correct one. Fixing up those links in PHPCompatibility should be easy enough to do.

Syntax

@link [URI] [description]

Refs:

@afilina afilina linked a pull request Mar 29, 2021 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants