Commit e5ac936
committed
Add some more cases where parentheses are needed in text output.
Fractions need parentheses around the numerator or denominator if
anything is after a factorial or a SupSub. For example, 2/(3!4!) or
2/(2^2 3^2).
SupSubs need parentheses on the superscripts or subscripts if anything
is after a factorial. For example, 2^(2!3!)
Also, a live fraction should be allowed to be typed after a factorial.
For example, if 2! is typed and then the forward slash is typed it
should result in the fraction with 2! in the numerator and the cursor in
the denominator. Currenlty the 2! is in front of the fraction and the
cursor is in the numerator.
This fixes openwebwork/webwork2#2821.1 parent 629bef0 commit e5ac936
2 files changed
Lines changed: 14 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
305 | 305 | | |
306 | 306 | | |
307 | 307 | | |
308 | | - | |
| 308 | + | |
309 | 309 | | |
310 | 310 | | |
311 | 311 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
716 | 716 | | |
717 | 717 | | |
718 | 718 | | |
| 719 | + | |
719 | 720 | | |
720 | 721 | | |
721 | 722 | | |
722 | 723 | | |
723 | 724 | | |
| 725 | + | |
724 | 726 | | |
725 | 727 | | |
726 | 728 | | |
| |||
730 | 732 | | |
731 | 733 | | |
732 | 734 | | |
| 735 | + | |
| 736 | + | |
| 737 | + | |
| 738 | + | |
| 739 | + | |
733 | 740 | | |
734 | 741 | | |
735 | 742 | | |
| |||
838 | 845 | | |
839 | 846 | | |
840 | 847 | | |
| 848 | + | |
841 | 849 | | |
842 | 850 | | |
843 | 851 | | |
844 | 852 | | |
845 | 853 | | |
| 854 | + | |
846 | 855 | | |
847 | 856 | | |
848 | 857 | | |
| |||
851 | 860 | | |
852 | 861 | | |
853 | 862 | | |
| 863 | + | |
| 864 | + | |
| 865 | + | |
| 866 | + | |
854 | 867 | | |
855 | 868 | | |
856 | 869 | | |
| |||
0 commit comments