33# First we'll start an undo action, then Ctrl-Z will undo the actions of the whole script
44editor .beginUndoAction ()
55
6- editor .replace ("\r \n " ,u "·\r \n " ) # end of line
7- editor .replace ("_\r \n " ,u "»\r \n " ) # output command
8- editor .replace ("->" ,u "‡" ) # assignment arrow
6+ editor .replace ("\r \n " ,"·\r \n " ) # end of line
7+ editor .replace ("_\r \n " ,"»\r \n " ) # output command
8+ editor .replace ("->" ,"‡" ) # assignment arrow
99
10- editor .replace ( "r" , u "Ð" ) # r
11- editor .replace ( "o" , u "–" ) # theta
12- editor .replace ( "i" , u "¸" ) # i
10+ editor .rereplace ( r"\br\b" , "Ð" ) # r
11+ editor .rereplace ( r"\bo\b" , "–" ) # theta
12+ editor .rereplace ( r"\bi\b" , "¸" ) # i
1313
14- editor .replace (">=" ,u "¯" ) # greater than or equal to
15- editor .replace ("<=" ,u "®" ) # less than or equal to
16- editor .replace ("<>" ,u "¬" ) # not equal
14+ editor .replace (">=" ,"¯" ) # greater than or equal to
15+ editor .replace ("<=" ,"®" ) # less than or equal to
16+ editor .replace ("<>" ,"¬" ) # not equal
1717
18- editor .replace ("*" ,u "£" ) # multiplication
19- editor .replace ("/" ,u "¤" ) # division
20- editor .replace ("!" ,u "ƒ" ) # factorial
18+ editor .replace ("*" ,"£" ) # multiplication
19+ editor .replace ("/" ,"¤" ) # division
20+ editor .replace ("!" ,"ƒ" ) # factorial
2121
2222# End the undo action, so Ctrl-Z will undo the above actions
2323editor .endUndoAction ()
0 commit comments