comparison sat/plugins/plugin_xep_0071.py @ 2780:85d3240a400f

plugin text syntaxes: changed import name to TEXT_SYNTAX (better with underscore for autocompletion)
author Goffi <goffi@goffi.org>
date Sat, 19 Jan 2019 11:39:02 +0100
parents 003b8b4b56a7
children ab2696e34d29
comparison
equal deleted inserted replaced
2779:4cfa2085aebf 2780:85d3240a400f
47 PLUGIN_INFO = { 47 PLUGIN_INFO = {
48 C.PI_NAME: "XHTML-IM Plugin", 48 C.PI_NAME: "XHTML-IM Plugin",
49 C.PI_IMPORT_NAME: "XEP-0071", 49 C.PI_IMPORT_NAME: "XEP-0071",
50 C.PI_TYPE: "XEP", 50 C.PI_TYPE: "XEP",
51 C.PI_PROTOCOLS: ["XEP-0071"], 51 C.PI_PROTOCOLS: ["XEP-0071"],
52 C.PI_DEPENDENCIES: ["TEXT-SYNTAXES"], 52 C.PI_DEPENDENCIES: ["TEXT_SYNTAXES"],
53 C.PI_MAIN: "XEP_0071", 53 C.PI_MAIN: "XEP_0071",
54 C.PI_HANDLER: "yes", 54 C.PI_HANDLER: "yes",
55 C.PI_DESCRIPTION: _("""Implementation of XHTML-IM"""), 55 C.PI_DESCRIPTION: _("""Implementation of XHTML-IM"""),
56 } 56 }
57 57
91 SYNTAX_XHTML_IM = "XHTML-IM" 91 SYNTAX_XHTML_IM = "XHTML-IM"
92 92
93 def __init__(self, host): 93 def __init__(self, host):
94 log.info(_("XHTML-IM plugin initialization")) 94 log.info(_("XHTML-IM plugin initialization"))
95 self.host = host 95 self.host = host
96 self._s = self.host.plugins["TEXT-SYNTAXES"] 96 self._s = self.host.plugins["TEXT_SYNTAXES"]
97 self._s.addSyntax( 97 self._s.addSyntax(
98 self.SYNTAX_XHTML_IM, 98 self.SYNTAX_XHTML_IM,
99 lambda xhtml: xhtml, 99 lambda xhtml: xhtml,
100 self.XHTML2XHTML_IM, 100 self.XHTML2XHTML_IM,
101 [self._s.OPT_HIDDEN], 101 [self._s.OPT_HIDDEN],