comparison sat/plugins/plugin_misc_text_syntaxes.py @ 3040:fee60f17ebac

jp: jp asyncio port: /!\ this commit is huge. Jp is temporarily not working with `dbus` bridge /!\ This patch implements the port of jp to asyncio, so it is now correctly using the bridge asynchronously, and it can be used with bridges like `pb`. This also simplify the code, notably for things which were previously implemented with many callbacks (like pagination with RSM). During the process, some behaviours have been modified/fixed, in jp and backends, check diff for details.
author Goffi <goffi@goffi.org>
date Wed, 25 Sep 2019 08:56:41 +0200
parents ab2696e34d29
children 501a1a3c8594
comparison
equal deleted inserted replaced
3039:a1bc34f90fa5 3040:fee60f17ebac
346 element.text = None 346 element.text = None
347 else: 347 else:
348 element.text = '' 348 element.text = ''
349 return html.tostring(xhtml_elt, encoding=str, method="xml") 349 return html.tostring(xhtml_elt, encoding=str, method="xml")
350 350
351 def convert( 351 def convert(self, text, syntax_from, syntax_to=_SYNTAX_XHTML, safe=True,
352 self, text, syntax_from, syntax_to=_SYNTAX_XHTML, safe=True, profile=None 352 profile=None):
353 ):
354 """Convert a text between two syntaxes 353 """Convert a text between two syntaxes
355 354
356 @param text: text to convert 355 @param text: text to convert
357 @param syntax_from: source syntax (e.g. "markdown") 356 @param syntax_from: source syntax (e.g. "markdown")
358 @param syntax_to: dest syntax (e.g.: "XHTML") 357 @param syntax_to: dest syntax (e.g.: "XHTML")