Show More
@@ -921,32 +921,31 b' def back_unicode_name_matches(text:str) -> Tuple[str, Sequence[str]]:' | |||||
921 | pass |
|
921 | pass | |
922 | return '', () |
|
922 | return '', () | |
923 |
|
923 | |||
924 | def back_latex_name_matches(text:str): |
|
924 | def back_latex_name_matches(text:str) -> Tuple[str, Sequence[str]] : | |
925 | """Match latex characters back to unicode name |
|
925 | """Match latex characters back to unicode name | |
926 |
|
926 | |||
927 | This does ``\\β΅`` -> ``\\aleph`` |
|
927 | This does ``\\β΅`` -> ``\\aleph`` | |
928 |
|
928 | |||
929 | Used on Python 3 only. |
|
|||
930 | """ |
|
929 | """ | |
931 | if len(text)<2: |
|
930 | if len(text)<2: | |
932 |
return |
|
931 | return '', () | |
933 | maybe_slash = text[-2] |
|
932 | maybe_slash = text[-2] | |
934 | if maybe_slash != '\\': |
|
933 | if maybe_slash != '\\': | |
935 |
return |
|
934 | return '', () | |
936 |
|
935 | |||
937 |
|
936 | |||
938 | char = text[-1] |
|
937 | char = text[-1] | |
939 | # no expand on quote for completion in strings. |
|
938 | # no expand on quote for completion in strings. | |
940 | # nor backcomplete standard ascii keys |
|
939 | # nor backcomplete standard ascii keys | |
941 |
if char in string.ascii_letters or char in |
|
940 | if char in string.ascii_letters or char in ('"',"'"): | |
942 |
return |
|
941 | return '', () | |
943 | try : |
|
942 | try : | |
944 | latex = reverse_latex_symbol[char] |
|
943 | latex = reverse_latex_symbol[char] | |
945 | # '\\' replace the \ as well |
|
944 | # '\\' replace the \ as well | |
946 | return '\\'+char,[latex] |
|
945 | return '\\'+char,[latex] | |
947 | except KeyError: |
|
946 | except KeyError: | |
948 | pass |
|
947 | pass | |
949 |
return |
|
948 | return '', () | |
950 |
|
949 | |||
951 |
|
950 | |||
952 | def _formatparamchildren(parameter) -> str: |
|
951 | def _formatparamchildren(parameter) -> str: | |
@@ -1192,7 +1191,7 b' class IPCompleter(Completer):' | |||||
1192 | def _clean_glob(self, text:str): |
|
1191 | def _clean_glob(self, text:str): | |
1193 | return self.glob("%s*" % text) |
|
1192 | return self.glob("%s*" % text) | |
1194 |
|
1193 | |||
1195 | def _clean_glob_win32(self,text:str): |
|
1194 | def _clean_glob_win32(self, text:str): | |
1196 | return [f.replace("\\","/") |
|
1195 | return [f.replace("\\","/") | |
1197 | for f in self.glob("%s*" % text)] |
|
1196 | for f in self.glob("%s*" % text)] | |
1198 |
|
1197 |
General Comments 0
You need to be logged in to leave comments.
Login now