Commit b17973da authored by Jean-Benoist Leger's avatar Jean-Benoist Leger

simplify transliterators declaration

parent e98a5e3c
......@@ -42,16 +42,11 @@ class converter:
def __init__(self):
"""Initialize a convert method."""
self.__cmds = {}
# transliteration
self.__cmds = {
r'\bb': transliterator(data.bb),
r'\bf': transliterator(data.bf),
r'\cal': transliterator(data.cal),
r'\frak': transliterator(data.frak),
r'\it': transliterator(data.it),
r'\mono': transliterator(data.mono),
}
for k,v in data.transliterators.items():
self.__cmds[k] = transliterator(v)
# symbols
def makefun(symb):
......
......@@ -621,6 +621,15 @@ mono = {
'9': '𝟿',
}
transliterators = {
r'\bb': bb,
r'\bf': bf,
r'\cal': cal,
r'\frak': frak,
r'\it': it,
r'\mono': mono,
}
symbols = {
r'\_': '_',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment