Skip to content

Commit

Permalink
feat: fix #2086 When navigation a root with an index, the index is no…
Browse files Browse the repository at this point in the history
…w navigater first.
  • Loading branch information
arnog committed Aug 10, 2023
1 parent fa92fd3 commit 0a04132
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

- Added `if-math-mode` and `if-text-mode` classes to conditionally show
virtual keyboard keys.
- **#2086** When navigation a root with an index, the index is now navigater first.

## 0.95.1 (2023-07-25)

Expand Down
5 changes: 5 additions & 0 deletions src/core-atoms/surd.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,11 @@ export class SurdAtom extends Atom {
return latexCommand(command, body);
}

// Custom implementation so that the navigation of the index feels natural
get children(): Atom[] {
return [...(this.above ?? []), ...(this.body ?? [])];
}

render(context: Context): Box | null {
// See the TeXbook pg. 443, Rule 11.
// http://www.ctex.org/documents/shredder/src/texbook.pdf
Expand Down

0 comments on commit 0a04132

Please sign in to comment.