Skip to content

Commit 958eff2

Browse files
[tex_to_unicode] v3
1 parent 6267a91 commit 958eff2

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

tex_to_unicode/__init__.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99

1010
from albert import *
1111

12-
md_iid = '2.3'
13-
md_version = "1.3"
12+
md_iid = "3.0"
13+
md_version = "2.0"
1414
md_name = "TeX to Unicode"
1515
md_description = "Convert TeX mathmode commands to unicode characters"
1616
md_license = "MIT"
@@ -23,7 +23,7 @@ class Plugin(PluginInstance, TriggerQueryHandler):
2323

2424
def __init__(self):
2525
PluginInstance.__init__(self)
26-
TriggerQueryHandler.__init__(self, self.id, self.name, self.description, defaultTrigger='tex ')
26+
TriggerQueryHandler.__init__(self)
2727
self.COMBINING_LONG_SOLIDUS_OVERLAY = "\u0338"
2828
self.iconUrls = [f"file:{Path(__file__).parent}/tex.svg"]
2929

@@ -38,13 +38,16 @@ def _create_item(self, text: str, subtext: str, can_copy: bool):
3838
)
3939
)
4040
return StandardItem(
41-
id=self.id,
41+
id=self.id(),
4242
text=text,
4343
subtext=subtext,
4444
iconUrls=self.iconUrls,
4545
actions=actions,
4646
)
4747

48+
def defaultTrigger(self):
49+
return "tex "
50+
4851
def handleTriggerQuery(self, query):
4952
stripped = query.string.strip()
5053

0 commit comments

Comments
 (0)