notepad-plus-plus / notepad-plus-plus/notepad-plus-plus

Link in the BBCode [url] is highlighted incorrectly

Open
#9,288 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

URL parser
Dominant language
C++
Stars
29.4k
Forks
5.4k
PR merge metrics
No merged PRs in 30d

Description

The latest URL highlighter handles BBCode [url] incorrectly. Example:

[url=https://docs.microsoft.com/en-us/windows/win32/api/libloaderapi/nf-libloaderapi-adddlldirectory]AddDllDirectory[/url]

It is expected that the URL parsing should be stopped at first ] because there is no opening [ in the URL. Now it lasts till the end.

Another similar (but artificial) example:

[https://docs.microsoft.com/en-us/windows/win32/api/libloaderapi/nf-libloaderapi-adddlldirectory]AddDllDirectory]

I would expect that it stops at the first ], bit it goes till the second ].

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Locate the URL highlighter and its BBCode parsing logic, then reproduce both examples from the issue. Verify that parsing stops at the first ] unless the URL contains a matching opening [, and add or update coverage for the reported cases.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
desktop
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.