verso-reader 0.1.0

A terminal EPUB reader with vim navigation, a Kindle-style library, and Markdown highlight export
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use verso::reader::anchor::reanchor;

#[test]
fn drift_logic_marks_status_correctly() {
    let new_text = "Prelude paragraph added. Original content continues here exactly as before.";
    let highlight_text = "Original content continues here exactly";
    let original_offset = 0; // pre-import offset
    let hit = reanchor(
        new_text,
        highlight_text,
        original_offset,
        "paragraph added. ",
        " as before.",
    );
    assert!(hit.is_some());
}