Skip to content

DesignCraft: An open-source page and layout design editor written by scratch in pure Rust

Hidden characters: the test reaches frame_hidden_marks in its new module

moppeeere779d9eea2a0
diff --git a/crates/ui-egui/src/canvas.rs b/crates/ui-egui/src/canvas.rs
index 3a1f8c733..5c0926b44 100644
--- a/crates/ui-egui/src/canvas.rs
+++ b/crates/ui-egui/src/canvas.rs
@@ -56,7 +56,7 @@ use scroll::{mods, navigation_space, scrollbars, spring_zoom_mode};
pub use text_overlay::selected_text;
use text_overlay::{draw_dynamic_spelling, draw_hidden_characters};
#[cfg(test)]
-use text_overlay::{draw_text_selection, hidden_marks};
+use text_overlay::{draw_text_selection, frame_hidden_marks, hidden_marks};
use tool_overlays::draw_tool_overlays;
pub(crate) use view::page_in_view;
use view::present_fit;
diff --git a/crates/ui-egui/src/canvas/text_overlay.rs b/crates/ui-egui/src/canvas/text_overlay.rs
index 6af92d842..ebf2a6349 100644
--- a/crates/ui-egui/src/canvas/text_overlay.rs
+++ b/crates/ui-egui/src/canvas/text_overlay.rs
@@ -288,7 +288,7 @@ pub(super) fn draw_hidden_characters(app: &DesignApp, painter: &egui::Painter, x
/// the line's ascent): its lines' marks, then its tables' — each text cell's own marks (nested
/// tables included) with its # where its text ends, and a table paragraph's ¶ after the last
/// row's bottom right corner. A table's own glyph-less line has no marks: its ¶ is that one.
-fn frame_hidden_marks(text: &str, ft: &compose::FrameText) -> Vec<(Point, &'static str, bool, f64)> {
+pub(super) fn frame_hidden_marks(text: &str, ft: &compose::FrameText) -> Vec<(Point, &'static str, bool, f64)> {
let table_lines: Vec<usize> = ft.tables.iter().map(|t| t.line).collect();
let mut out: Vec<_> = ft
.lines