From 3691f1ac390778b4ebe16180172da4a3c0cc5168 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Wed, 31 Dec 2014 16:07:01 +0530 Subject: [PATCH] ... --- src/calibre/gui2/tweak_book/{snips.py => snippets.py} | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) rename src/calibre/gui2/tweak_book/{snips.py => snippets.py} (98%) diff --git a/src/calibre/gui2/tweak_book/snips.py b/src/calibre/gui2/tweak_book/snippets.py similarity index 98% rename from src/calibre/gui2/tweak_book/snips.py rename to src/calibre/gui2/tweak_book/snippets.py index 29b3f35a63..50b1946f65 100644 --- a/src/calibre/gui2/tweak_book/snips.py +++ b/src/calibre/gui2/tweak_book/snippets.py @@ -13,7 +13,7 @@ from operator import attrgetter from calibre.utils.icu import string_length -builtin_snips = { +builtin_snippets = { # {{{ '<<' : { 'description': _('Insert a HTML tag'), 'template': '<$1>${2*}', @@ -39,8 +39,9 @@ builtin_snips = { 'template': '<$1 class="$2">${3*}', }, -} +} # }}} +# Parsing of snippets {{{ escape = unescape = None def escape_funcs(): global escape, unescape @@ -107,3 +108,5 @@ def parse_template(template, start_offset=0, is_toplevel=True, grouped=True): ans[num] = stops tab_stops = ans return ''.join(parts), tab_stops + +# }}}