aboutsummaryrefslogtreecommitdiff
path: root/src/locale.rs
diff options
context:
space:
mode:
authorChristian Duerr <contact@christianduerr.com>2018-10-04 21:02:11 +0200
committerChristian Duerr <contact@christianduerr.com>2018-10-04 21:17:41 +0200
commit4102fc994a390cd3aef6c06a1ee3f8117d14ca63 (patch)
tree484069d86cc830117860b6d0a200bf74c494a84a /src/locale.rs
parent958a4326a2615c0a486a6ef450729625a97b9118 (diff)
downloadalacritty-4102fc994a390cd3aef6c06a1ee3f8117d14ca63.tar.gz
alacritty-4102fc994a390cd3aef6c06a1ee3f8117d14ca63.zip
Add heuristic to remove parentheses
While parentheses in URLs are perfectly legal in positions even where they don't make a lot of sense (like `https://github.com)`), they can often lead to parsing errors when URLs are added in parentheses as side comment (like `(https://github.com)`). To improve the URL parsing when clicking on links, special heuristics have been added which aim to remove parentheses in occasions where they are not expected to be part of the URL. This includes removing leading parentheses (like `((https://url.com`), which are always removed before any other heuristic. If the URL ends with closing parentheses, but there are no matching opening parentheses in the URL (after stripping all leading parentheses), the trailing parentheses will also be removed until there are only matching parentheses left. This allows parsing URLs like `https://github.com/de(mo).html)))`.
Diffstat (limited to 'src/locale.rs')
0 files changed, 0 insertions, 0 deletions