plugin text syntaxes: changed import name to TEXT_SYNTAX (better with underscore for autocompletion)
This commit is contained in:
parent
604ff498da
commit
f1c0eca9ab
1 changed files with 18 additions and 18 deletions
|
|
@ -55,7 +55,7 @@ PLUGIN_INFO = {
|
|||
C.PI_IMPORT_NAME: "XEP-0277",
|
||||
C.PI_TYPE: "XEP",
|
||||
C.PI_PROTOCOLS: ["XEP-0277"],
|
||||
C.PI_DEPENDENCIES: ["XEP-0163", "XEP-0060", "TEXT-SYNTAXES"],
|
||||
C.PI_DEPENDENCIES: ["XEP-0163", "XEP-0060", "TEXT_SYNTAXES"],
|
||||
C.PI_RECOMMENDATIONS: ["XEP-0059", "EXTRA-PEP"],
|
||||
C.PI_MAIN: "XEP_0277",
|
||||
C.PI_HANDLER: "yes",
|
||||
|
|
@ -249,7 +249,7 @@ class XEP_0277(object):
|
|||
)
|
||||
key = check_conflict(u"{}_xhtml".format(elem.name))
|
||||
data = data_elt.toXml()
|
||||
microblog_data[key] = yield self.host.plugins["TEXT-SYNTAXES"].cleanXHTML(
|
||||
microblog_data[key] = yield self.host.plugins["TEXT_SYNTAXES"].cleanXHTML(
|
||||
data
|
||||
)
|
||||
else:
|
||||
|
|
@ -322,10 +322,10 @@ class XEP_0277(object):
|
|||
)
|
||||
)
|
||||
# ... and do the conversion if it's not
|
||||
microblog_data[key] = yield self.host.plugins["TEXT-SYNTAXES"].convert(
|
||||
microblog_data[key] = yield self.host.plugins["TEXT_SYNTAXES"].convert(
|
||||
microblog_data[u"{}_xhtml".format(key)],
|
||||
self.host.plugins["TEXT-SYNTAXES"].SYNTAX_XHTML,
|
||||
self.host.plugins["TEXT-SYNTAXES"].SYNTAX_TEXT,
|
||||
self.host.plugins["TEXT_SYNTAXES"].SYNTAX_XHTML,
|
||||
self.host.plugins["TEXT_SYNTAXES"].SYNTAX_TEXT,
|
||||
False,
|
||||
)
|
||||
|
||||
|
|
@ -472,7 +472,7 @@ class XEP_0277(object):
|
|||
entry_elt[(C.NS_XML, u"lang")] = data[u"language"].strip()
|
||||
|
||||
## content and title ##
|
||||
synt = self.host.plugins["TEXT-SYNTAXES"]
|
||||
synt = self.host.plugins["TEXT_SYNTAXES"]
|
||||
|
||||
for elem_name in ("title", "content"):
|
||||
for type_ in ["", "_rich", "_xhtml"]:
|
||||
|
|
@ -514,11 +514,11 @@ class XEP_0277(object):
|
|||
# so we create one from xhtml content
|
||||
elem_txt = entry_elt.addElement(elem_name)
|
||||
text_content = yield self.host.plugins[
|
||||
"TEXT-SYNTAXES"
|
||||
"TEXT_SYNTAXES"
|
||||
].convert(
|
||||
xml_content,
|
||||
self.host.plugins["TEXT-SYNTAXES"].SYNTAX_XHTML,
|
||||
self.host.plugins["TEXT-SYNTAXES"].SYNTAX_TEXT,
|
||||
self.host.plugins["TEXT_SYNTAXES"].SYNTAX_XHTML,
|
||||
self.host.plugins["TEXT_SYNTAXES"].SYNTAX_TEXT,
|
||||
False,
|
||||
)
|
||||
elem_txt.addContent(text_content)
|
||||
|
|
|
|||
Loading…
Reference in a new issue