Mercurial > libervia-backend
comparison src/plugins/plugin_misc_text_syntaxes.py @ 2145:33c8c4973743
core (plugins): added missing contants + use of new constants in PLUGIN_INFO
author | Goffi <goffi@goffi.org> |
---|---|
date | Sun, 12 Feb 2017 18:59:10 +0100 |
parents | 5874da3811b7 |
children | fe922e6fabd4 |
comparison
equal
deleted
inserted
replaced
2144:1d3f73e065e1 | 2145:33c8c4973743 |
---|---|
16 | 16 |
17 # You should have received a copy of the GNU Affero General Public License | 17 # You should have received a copy of the GNU Affero General Public License |
18 # along with this program. If not, see <http://www.gnu.org/licenses/>. | 18 # along with this program. If not, see <http://www.gnu.org/licenses/>. |
19 | 19 |
20 from sat.core.i18n import _, D_ | 20 from sat.core.i18n import _, D_ |
21 from sat.core.constants import Const as C | |
21 from sat.core.log import getLogger | 22 from sat.core.log import getLogger |
22 log = getLogger(__name__) | 23 log = getLogger(__name__) |
23 | 24 |
24 from twisted.internet import defer | 25 from twisted.internet import defer |
25 from twisted.internet.threads import deferToThread | 26 from twisted.internet.threads import deferToThread |
50 'rgba\( *((\d+(.\d+)?), *){3}(\d+(.\d+)?) *\)', # rgba function | 51 'rgba\( *((\d+(.\d+)?), *){3}(\d+(.\d+)?) *\)', # rgba function |
51 ]) + ') *(!important)?$' # we accept "!important" at the end | 52 ]) + ') *(!important)?$' # we accept "!important" at the end |
52 STYLES_ACCEPTED_VALUE = re.compile(STYLES_VALUES_REGEX) | 53 STYLES_ACCEPTED_VALUE = re.compile(STYLES_VALUES_REGEX) |
53 | 54 |
54 PLUGIN_INFO = { | 55 PLUGIN_INFO = { |
55 "name": "Text syntaxes", | 56 C.PI_NAME: "Text syntaxes", |
56 "import_name": "TEXT-SYNTAXES", | 57 C.PI_IMPORT_NAME: "TEXT-SYNTAXES", |
57 "type": "MISC", | 58 C.PI_TYPE: "MISC", |
58 "protocols": [], | 59 C.PI_PROTOCOLS: [], |
59 "dependencies": [], | 60 C.PI_DEPENDENCIES: [], |
60 "main": "TextSyntaxes", | 61 C.PI_MAIN: "TextSyntaxes", |
61 "handler": "no", | 62 C.PI_HANDLER: "no", |
62 "description": _("""Management of various text syntaxes (XHTML-IM, Markdown, etc)""") | 63 C.PI_DESCRIPTION: _("""Management of various text syntaxes (XHTML-IM, Markdown, etc)""") |
63 } | 64 } |
64 | 65 |
65 class UnknownSyntax(Exception): | 66 class UnknownSyntax(Exception): |
66 pass | 67 pass |
67 | 68 |