From 9b1cf66a0f141b361187ff11d89b9a0f94651377 Mon Sep 17 00:00:00 2001 From: NSoiffer Date: Tue, 31 Oct 2023 01:15:39 +0100 Subject: [PATCH] Adds middle dot (U+00B7) to list of shorthand dot-like chars for mover. Added test Fixes: 204 --- Rules/Braille/UEB/UEB_Rules.yaml | 4 ++-- tests/braille/UEB/other.rs | 7 +++++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/Rules/Braille/UEB/UEB_Rules.yaml b/Rules/Braille/UEB/UEB_Rules.yaml index 6f064d87..8d0fbc17 100644 --- a/Rules/Braille/UEB/UEB_Rules.yaml +++ b/Rules/Braille/UEB/UEB_Rules.yaml @@ -264,7 +264,7 @@ - name: single-char-exceptions # GTM 12 tag: [mover, munder] - match: "*[2][string-length(.) = 1 and ( translate(., '_¯→.˙~^','')='' or (parent::m:mover and text()='⌒') )]" + match: "*[2][string-length(.) = 1 and ( translate(., '_¯→.·˙~^','')='' or (parent::m:mover and text()='⌒') )]" replace: - test: # omit grouping indicators in the following cases @@ -293,7 +293,7 @@ then: [t: "⠱"] - else_if: "*[2][text()='→']" then: [t: "⠘⠱"] - - else_if: "*[2][text()='.' or text()='˙']" + - else_if: "*[2][text()='.' or text()='·' or text()='˙']" then: [t: "⠘⠲"] - else_if: "*[2][text()='~']" then: [t: "⠸⠱"] diff --git a/tests/braille/UEB/other.rs b/tests/braille/UEB/other.rs index dda1c45d..e0c0e611 100644 --- a/tests/braille/UEB/other.rs +++ b/tests/braille/UEB/other.rs @@ -47,6 +47,13 @@ fn not_number_space_blocks() { test_braille("UEB", expr, "⠼⠁⠃⠉⠀⠼⠙⠑⠋"); } +#[test] +fn dot_above_bug_204() { + // https://github.com/NSoiffer/MathCAT/issues/204 + let expr = " 0. 6 · "; + test_braille("UEB", expr, "⠼⠚⠲⠣⠼⠋⠜⠘⠲"); +} + #[test] fn space_hack_between_digits() { // https://github.com/NSoiffer/MathCAT/issues/144