Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,15 @@ jobs:
echo 'merge_derives = true' >> .rustfmt.toml
echo 'use_small_heuristics = "Default"' >> .rustfmt.toml
cargo fmt
- name: Test
run: bun run test
- name: Test (Rust coverage)
timeout-minutes: 20
run: bun run test:rust
- name: Test (Node)
timeout-minutes: 10
run: bun run test:node
- name: Test (Python)
timeout-minutes: 10
run: bun run test:python
- name: Format Rollback
shell: bash
run: |
Expand Down
24 changes: 12 additions & 12 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 12 additions & 14 deletions bun.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion libs/braillify/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ phf = { version = "0.14.0", features = ["macros"] }
clap = { version = "4.6.1", features = ["derive"], optional = true }
anyhow = { version = "1.0.103", optional = true }
rustyline = { version = "18.0.1", optional = true }
regex = "1.12.4"
regex = "1.13.0"
once_cell = "1.21.4"
unicode-normalization = "0.1.25"
dhat = { version = "0.3.3", optional = true }
Expand Down
9 changes: 3 additions & 6 deletions libs/braillify/src/fraction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,12 +94,9 @@ fn read_braced_content(iter: &mut std::iter::Peekable<std::str::Chars>) -> Optio
iter.next();
}
_ => {
if let Some(digit) = normalize_digit(*c) {
content.push(digit);
iter.next();
} else {
return None;
}
let digit = normalize_digit(*c)?;
content.push(digit);
iter.next();
}
}
}
Expand Down
26 changes: 26 additions & 0 deletions libs/braillify/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1728,6 +1728,20 @@ mod coverage_targeted_tests {
assert_eq!(normalize_math_alphanumeric_char(input), expected);
}

#[test]
fn normalize_math_alphanumeric_runtime_block_offset() {
let input = std::hint::black_box('\u{1D44F}');

assert_eq!(normalize_math_alphanumeric_char(input), 'b');
}

#[test]
fn normalize_math_alphanumeric_runtime_digit_offset() {
let input = std::hint::black_box('\u{1D7D9}');

assert_eq!(normalize_math_alphanumeric_char(input), '1');
}

/// `normalize_math_alphanumeric_string` short-circuits when no trigger char
/// is present (Cow::Borrowed) and otherwise allocates a new String (Cow::Owned).
#[test]
Expand All @@ -1744,6 +1758,18 @@ mod coverage_targeted_tests {
assert_eq!(result.as_ref(), "X = A");
}

#[test]
fn encode_decomposes_runtime_accented_latin_when_triggered() {
let input = std::hint::black_box("café");

let encoded = encode_with_options(input, &EncodeOptions::default()).unwrap();

assert_eq!(
encoded,
encode_with_options("cafe\u{301}", &EncodeOptions::default()).unwrap()
);
}

/// Korean 제68항 — compact uppercase + subscript digit is Korean/math-owned by
/// default, not UEB §3.24. This protects both plain Unicode and LaTeX token
/// forms from the English §9 styled-letter preflight.
Expand Down
Loading
Loading