From 6414770de71efb5ea7dd2487caa99d83f7ff76ee Mon Sep 17 00:00:00 2001 From: GloamXun Date: Mon, 19 Oct 2026 18:34:54 +0800 Subject: [PATCH] Cover hyperlink colour across line breaks --- docs/STATUS.md | 2 +- tests/typeset.rs | 27 +++++++++++++++++++++++++++ 2 files changed, 28 insertions(+), 1 deletion(-) diff --git a/docs/STATUS.md b/docs/STATUS.md index d3b3b8b..93de13c 100644 --- a/docs/STATUS.md +++ b/docs/STATUS.md @@ -115,7 +115,7 @@ See `docs/ROADMAP.md` for concrete implementation plans. - ASCII-only documents use non-embedded Base-14 Times/Courier (arXiv PDF is about 0.7 MB); documents with accented/non-WinAnsi text embed Liberation faces. Tables use natural column widths and centered rules. -- `cargo fmt --check` passes; `cargo test --offline` (49 tests: 45 compiler +- `cargo fmt --check` passes; `cargo test --offline` (50 tests: 46 compiler integration tests + 4 server tests) covers the three examples, the arXiv fixture, figure/table floats (top and bottom), newpage, page styles and `\thispagestyle`, SVG/PDF output, project API, static frontend assets, path traversal, the legacy diff --git a/tests/typeset.rs b/tests/typeset.rs index 5ac8c0f..d92d182 100644 --- a/tests/typeset.rs +++ b/tests/typeset.rs @@ -1392,6 +1392,33 @@ fn natbib_citations_use_author_year() { ); } +fn text_has_fill(svg: &str, word: &str, fill: &str) -> bool { + let needle = format!(">{word}"); + let Some(end) = svg.find(&needle) else { + return false; + }; + let start = svg[..end].rfind("