Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Interface additions #253

Merged
merged 8 commits into from
Feb 19, 2024
Merged

Interface additions #253

merged 8 commits into from
Feb 19, 2024

Conversation

NSoiffer
Copy link
Owner

Added interfaces:

  • pub fn set_navigation_mathml(id: String, offset: usize) -> Result()
  • pub fn get_navigation_node_from_braille_position(position: usize) -> Result<(String, usize)>

Added a test for it.

Also fixed MoveLastCommand for when there isn't a last command. In this case, the stack was being popped which left it empty. I changed 'pop' so it won't pop the last (initial starting node) off the stack.
```
pub fn get_braille_position() -> Result<(usize, usize)
```
Implements/fixes #124
```
get_navigation_node_from_braille_position(position: usize) -> Result<(String, usize)>
```
Implements #123, but still a little buggy.

Fix bug I discovered where in Nemeth, the baseline indicator isn't highlighted when the `msup` node is the nav focus. To do this, I added a hack that hopefully doesn't get out of hand: 'b' is turned into '𝑏' to indicate this is a highlighted 'b' and the substitution has dots 7 & 8 added to it. A couple of regexps needed to change a little to handled this. This only happens if "BrailleCode" is "Nemeth" because 'b' is used for other things in UEB, etc.

I added a test that sweeps across all the positions in the quadratic formula. Nemeth passes, but now I need to work on making UEB pass that same test.
Pulled leaf part out find_navigation_node()
@NSoiffer NSoiffer merged commit 4a9c8b7 into main Feb 19, 2024
1 check passed
@NSoiffer NSoiffer deleted the interface-additions branch February 20, 2024 00:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant