Skip to content

Commit a51b142

Browse files
Merge branch 'NSoiffer:main' into main
2 parents 152a9e3 + cfc79d8 commit a51b142

File tree

12 files changed

+231
-166
lines changed

12 files changed

+231
-166
lines changed

.github/workflows/rust.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,19 @@ env:
1111

1212
jobs:
1313
build:
14-
14+
name: Build and Test
1515
runs-on: ubuntu-latest
16-
1716
steps:
1817
- uses: actions/checkout@v3
1918
- name: Build
2019
run: cargo build --verbose
2120
- name: Run tests
2221
run: cargo test --verbose
23-
- name: Run Clippy/Lint
22+
23+
clippy:
24+
name: Clippy/Lint check
25+
runs-on: ubuntu-latest
26+
steps:
27+
- uses: actions/checkout@v3
28+
- name: run clippy
2429
run: cargo clippy

.vscode/launch.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"configurations": [
77
{
88
"name": "(Windows) Launch",
9-
"type": "lldb", //"cppvsdbg",
9+
"type": "cppvsdbg", // "lldb",
1010
"request": "launch",
1111
"program": "${workspaceRoot}/target/debug/mathcat.exe",
1212
"args": [],
@@ -17,7 +17,7 @@
1717
},
1818
{
1919
"name": "Run Test Debugger",
20-
"type": "lldb", //"cppvsdbg",
20+
"type": "cppvsdbg", // "lldb",
2121
"request": "launch",
2222
"program": "${workspaceRoot}/target/debug/mathcat.exe",
2323
"args": [],

Cargo.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@ log = "0.4"
3838
env_logger = "0.11"
3939
cfg-if = "1.0"
4040
[target.'cfg(target_family = "wasm")'.dependencies]
41-
zip = { version = "4.0", default-features = false, features = ["deflate"] }
41+
zip = { version = "4.1", default-features = false, features = ["deflate"] }
4242
[target.'cfg(not(target_family = "wasm"))'.dependencies]
43-
zip = { version = "4.0", default-features = false, features = ["bzip2"] }
43+
zip = { version = "4.1", default-features = false, features = ["bzip2"] }
4444
fastrand = { version = "2.3.0" }
4545

4646
android_logger = {version = "0.15.0", optional = true}
@@ -51,9 +51,9 @@ android_logger = {version = "0.15.0", optional = true}
5151
bitflags = "2.6"
5252
error-chain = "0.12.4"
5353
[target.'cfg(target_family = "wasm")'.build-dependencies]
54-
zip = { version = "4.0", default-features = false, features = ["deflate"] }
54+
zip = { version = "4.1", default-features = false, features = ["deflate"] }
5555
[target.'cfg(not(target_family = "wasm"))'.build-dependencies]
56-
zip = { version = "4.0", default-features = false, features = ["bzip2"] }
56+
zip = { version = "4.1", default-features = false, features = ["bzip2"] }
5757

5858
[lib]
5959
name = "libmathcat"

Rules/Braille/UEB/UEB_Rules.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@
246246
tag: mo
247247
# add spaces around comparison operators unless they are in a script position,
248248
variables: # ratio not spaced in UEB; also make sure it is an infix operator (e.g., "~" can be prefix)
249-
- AddSpaces: "$UEB_UseSpacesAroundAllOperators or
249+
- AddSpaces: "$UseSpacesAroundAllOperators or
250250
( parent::*[self::m:mrow] and $NewScriptContext='' and
251251
.!='∶' and IsInDefinition(., 'Braille', 'NemethComparisonOperators') )"
252252
match: "."

Rules/prefs.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
Braille:
5757
BrailleCode: "Nemeth" # Any supported braille code (currently Nemeth, UEB)
5858
BrailleNavHighlight: EndPoints # Highlight with dots 7 & 8 the current nav node -- values are Off, FirstChar, EndPoints, All
59-
UseSpacesAroundAllOperators: false # true/false
59+
UseSpacesAroundAllOperators: false # true/false (otherwise typically around comparison operators only)
6060

6161
Nemeth:
6262
# Nemeth defines the typeforms: Bold, Italic, SansSerif, and Script. That leaves out DoubleStruck (Blackboard Bold)
@@ -69,7 +69,6 @@
6969

7070
UEB:
7171
StartMode: "Grade2" # Grade1/Grade2 -- assumed starting mode UEB braille (Grade1 assumes we are in G1 passage mode)
72-
UseSpacesAroundAllOperators: false # true/false
7372

7473
# UEB Guide to Technical Material (https://iceb.org/Guidelines_for_Technical_Material_2008-10.pdf)
7574
# says to normally treat Fraktur and DoubleStruck as Script

src/braille.rs

Lines changed: 145 additions & 83 deletions
Large diffs are not rendered by default.

src/infer_intent.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ pub fn intent_speech_for_name(intent_name: &str, verbosity: &str, fixity: &str)
223223
}
224224
}
225225
};
226-
return intent_name.replace(&['_', '-'], " ").trim().to_string();
226+
return intent_name.replace(['_', '-'], " ").trim().to_string();
227227
})
228228
}
229229

src/navigate.rs

Lines changed: 63 additions & 63 deletions
Large diffs are not rendered by default.

src/speech.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2459,7 +2459,7 @@ impl<'c, 's:'c, 'r, 'm:'c> SpeechRulesWithContext<'c, 's,'m> {
24592459

24602460
// the 'b' for baseline indicator is really part of the previous token, so it needs to be highlighted but isn't because it is not Unicode braille
24612461
let baseline_indicator_hack = PreferenceManager::get().borrow().pref_to_string("BrailleCode") == "Nemeth";
2462-
// debug!("highlight_braille_string: braille={}", braille);
2462+
// debug!("highlight_braille_string: highlight_style={}\n braille={}", highlight_style, braille);
24632463
let mut i_first_modified = 0;
24642464
for i in 0..chars.len() {
24652465
let ch = chars[i];
@@ -2480,6 +2480,7 @@ impl<'c, 's:'c, 'r, 'm:'c> SpeechRulesWithContext<'c, 's,'m> {
24802480
chars[i] = modified_ch;
24812481
if ch != modified_ch {
24822482
i_last_modified = i;
2483+
break;
24832484
}
24842485
}
24852486
}
@@ -2492,7 +2493,7 @@ impl<'c, 's:'c, 'r, 'm:'c> SpeechRulesWithContext<'c, 's,'m> {
24922493
}
24932494

24942495
let result = chars.into_iter().collect::<String>();
2495-
// debug!(" result={}", result);
2496+
// debug!(" result={}", result);
24962497
return result;
24972498

24982499
fn add_dots_to_braille_char(ch: char, baseline_indicator_hack: bool) -> char {

tests/braille/CMU/once.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1468,8 +1468,6 @@ fn units_appendix_1_3_1_auto_intent() {
14681468

14691469
// FIX: add 2.6 (Chemistry)
14701470

1471-
// FIX: add 3.2.1 (repeating numbers)
1472-
14731471
// FIX: add 3.4 math variants
14741472

14751473

0 commit comments

Comments
 (0)