fix(ui): import for_launcher where links are followed

This commit is contained in:
Dylan M. Taylor
2026-11-03 17:50:03 +00:00
parent da90a56de9
commit d000b2af86
3 changed files with 3 additions and 2 deletions
+1 -1
View File
@@ -47,7 +47,7 @@ use input::{EDGE_MARGIN, EDGE_MAX_DT, EDGE_SPEED_MAX};
use input::{UnitDrag, clamped_scroll, edge_scroll, mouse, wheel_hovered};
pub(crate) use input::{hold_document_selection, press_count};
#[cfg(test)]
use links::{field_link, for_launcher, is_followable_link, is_generated_bookmark_link};
use links::{field_link, is_followable_link, is_generated_bookmark_link};
#[cfg(test)]
use margins::MIN_TEXT;
#[cfg(test)]
+1 -1
View File
@@ -1,5 +1,5 @@
use super::balloons::over_balloon;
use super::links::{field_showing_code, is_followable_link, is_generated_bookmark_link, link_under};
use super::links::{field_showing_code, for_launcher, is_followable_link, is_generated_bookmark_link, link_under};
use super::navigation::page_at;
use super::story::{enters_header_footer, in_text_box, part_kind, text_box_host};
use super::{CanvasState, DocLayout, PartKind, Pos, Pos2, Rect, StoryRef, Ui, WordApp, json};
+1
View File
@@ -2648,6 +2648,7 @@ fn only_web_and_email_links_are_followed() {
#[test]
fn followed_links_reach_the_launcher_without_command_line_syntax() {
use super::links::for_launcher;
assert_eq!(for_launcher("https://x.example/a|calc"), "https://x.example/a%7Ccalc");
assert_eq!(for_launcher("https://x.example/a^b<c>d(e)f!g\"h i"), "https://x.example/a%5Eb%3Cc%3Ed%28e%29f%21g%22h%20i");
// Ordinary links, queries and existing escapes are unchanged.