Add regex for title text version of links

* Add regex for title text version of links

Original parser matched:
  [name](http:://link)

Add match for:
  [name](http:://link "title text")

* Add tests and improve regex's
* Several new tests in test_maddy_linkparser.cpp  (Some with paths for future improvement, and one to ensure an overzealous future update doesn't disallow actually-used special characters like o-umlaut).
* URLs now ignore leading/trailing spaces.
* URLs now don't match on internal spaces or quotes.
* Small grammar fix in CONTRIBUTING.md
* Updated changelog.
This commit is contained in:
Lucian Smith
2025-04-20 09:45:27 -07:00
committed by GitHub
parent af59cd13d4
commit 2a00c9fb0b
6 changed files with 166 additions and 6 deletions

View File

@@ -13,6 +13,10 @@ maddy uses [semver versioning](https://semver.org/).
* ![**REMOVED**](https://img.shields.io/badge/-REMOVED-%23900) for now removed features.
## Upcoming
* ![**ADDED**](https://img.shields.io/badge/-ADDED-%23099) Correctly parse links with title text, i.e. `[link](http://example.com "example")`.
* ![**FIXED**](https://img.shields.io/badge/-FIXED-%23090) Do not create invalid URLs from links with spaces, i.e. `[link](/ABC/some file)`.
* ![**FIXED**](https://img.shields.io/badge/-FIXED-%23090) Do not create invalid HTML from links with quotes, i.e. `[link](/ABC/some"file)`.
## version 1.4.0 2025-03-28