mirror of
https://github.com/storytold/designcraft.git
synced 2026-10-25 10:46:50 -06:00
Integration: GREP lookbehind overlay test passes the drop-cap end (#425)
next's overlays() takes the drop cap's end as a fifth argument; the test from #316 calls it with 0, like the other overlay tests.
This commit is contained in:
@@ -129,7 +129,7 @@ mod tests {
|
||||
fn grep_style_with_lookbehind() {
|
||||
// Polish one-letter words kept with the next one; the space before is not styled.
|
||||
let text = "Ala i kot w domu.\n".to_string();
|
||||
let o = overlays(&text, 0..text.len(), &[], &[GrepStyle { style: "nobreak".into(), pattern: r"(?<=\s)[aiouwzAIOUWZ]\s".into() }]);
|
||||
let o = overlays(&text, 0..text.len(), &[], &[GrepStyle { style: "nobreak".into(), pattern: r"(?<=\s)[aiouwzAIOUWZ]\s".into() }], 0);
|
||||
let got: Vec<&str> = o.iter().map(|(r, _)| &text[r.clone()]).collect();
|
||||
assert_eq!(got, ["i ", "w "]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user