notepad-plus-plus / notepad-plus-plus/notepad-plus-plus
Link in the BBCode [url] is highlighted incorrectly
Nobody has claimed this yet.
- 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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