From c17d8db16934fa2dbd667acea697cd0682826c80 Mon Sep 17 00:00:00 2001 From: Alfonso Montero Date: Sat, 22 May 2021 01:09:06 +0200 Subject: [PATCH] Add ipfs/ipns URL scheme support --- CHANGELOG.md | 8 +++++++- alacritty.yml | 2 +- alacritty/src/config/ui_config.rs | 2 +- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 54407ea9..45f58d57 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,13 @@ The sections should follow the order `Packaging`, `Added`, `Changed`, `Fixed` an The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). -## 0.8.0-dev +## 0.9.0-dev + +### Added + +- Support for `ipfs`/`ipns` URLs + +## 0.8.0 ### Packaging diff --git a/alacritty.yml b/alacritty.yml index 776d417a..8f4f5218 100644 --- a/alacritty.yml +++ b/alacritty.yml @@ -478,7 +478,7 @@ # - MoveViModeCursor # Move the vi mode cursor to the beginning of the hint. #enabled: - # - regex: "(magnet:|mailto:|gemini:|gopher:|https:|http:|news:|file:|git:|ssh:|ftp:)\ + # - regex: "(ipfs:|ipns:|magnet:|mailto:|gemini:|gopher:|https:|http:|news:|file:|git:|ssh:|ftp:)\ # [^\u0000-\u001F\u007F-\u009F<>\"\\s{-}\\^⟨⟩`]+" # command: xdg-open # post_processing: true diff --git a/alacritty/src/config/ui_config.rs b/alacritty/src/config/ui_config.rs index d1f16f85..460eebb0 100644 --- a/alacritty/src/config/ui_config.rs +++ b/alacritty/src/config/ui_config.rs @@ -24,7 +24,7 @@ use crate::config::window::WindowConfig; /// Regex used for the default URL hint. #[rustfmt::skip] -const URL_REGEX: &str = "(magnet:|mailto:|gemini:|gopher:|https:|http:|news:|file:|git:|ssh:|ftp:)\ +const URL_REGEX: &str = "(ipfs:|ipns:|magnet:|mailto:|gemini:|gopher:|https:|http:|news:|file:|git:|ssh:|ftp:)\ [^\u{0000}-\u{001F}\u{007F}-\u{009F}<>\"\\s{-}\\^⟨⟩`]+"; #[derive(ConfigDeserialize, Debug, PartialEq)]