LMMS / LMMS/lmms.io

Parse links in LSP comments

Open
#118 1 comment 0 reactions 0 assignees View on GitHub
enhancement lsp
Dominant language
PHP
Stars
115
Forks
60
Avg merge
14h 5m
Merged PRs (30d)
1

Description

Since we already parse links in the descrpitions, it'd be really nice if links inside comments are parsed too.

Now its really hard to follow a link like this:
![hard to follow](https://cloud.githubusercontent.com/assets/6282045/5344424/aca1dcba-7f0f-11e4-8f7b-af6584bda51e.png)

The preg_replace code for links can surely be reused, but it should look like this

``` php
$message = preg_replace('#\b((https?://)([a-zA-Z0-9\/\*\-\_\?\&\;\%\=\.])+)#i', '$1', $message);
```

rather than this

``` php
$message = preg_replace('#([^"])\b((https?://)([a-zA-Z0-9\/\*\-\_\?\&\;\%\=\.])+)#i', '$1$2', $message);
```

Because there are no `iframes` in the comments so the 'don't parse if there is an " before the link' hack isn't needed.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by finding the existing link parsing used for descriptions and the code that renders LSP comments. Confirm the comment path applies the requested link parsing without iframe-specific handling, then verify that a plain URL and the supplied image URL are rendered as links.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
backend
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.