Match latex characters back to unicode name This does ``\\ℵ`` -> ``\\aleph`` Used on Python 3 only.
(text:str)
| 917 | return u'', () |
| 918 | |
| 919 | def back_latex_name_matches(text:str): |
| 920 | """Match latex characters back to unicode name |
| 921 | |
| 922 | This does ``\\ℵ`` -> ``\\aleph`` |
| 923 | |
| 924 | Used on Python 3 only. |
| 925 | """ |
| 926 | if len(text)<2: |
| 927 | return u'', () |
| 928 | maybe_slash = text[-2] |
| 929 | if maybe_slash != '\\': |
| 930 | return u'', () |
| 931 | |
| 932 | |
| 933 | char = text[-1] |
| 934 | # no expand on quote for completion in strings. |
| 935 | # nor backcomplete standard ascii keys |
| 936 | if char in string.ascii_letters or char in ['"',"'"]: |
| 937 | return u'', () |
| 938 | try : |
| 939 | latex = reverse_latex_symbol[char] |
| 940 | # '\\' replace the \ as well |
| 941 | return '\\'+char,[latex] |
| 942 | except KeyError: |
| 943 | pass |
| 944 | return u'', () |
| 945 | |
| 946 | |
| 947 | def _formatparamchildren(parameter) -> str: |
nothing calls this directly
no outgoing calls
no test coverage detected