diff --git a/src/calibre/gui2/tweak_book/editor/snippets.py b/src/calibre/gui2/tweak_book/editor/snippets.py index 62c5d8f665..8820d90b0b 100644 --- a/src/calibre/gui2/tweak_book/editor/snippets.py +++ b/src/calibre/gui2/tweak_book/editor/snippets.py @@ -22,6 +22,7 @@ from calibre.gui2.tweak_book.editor.smarts.utils import get_text_before_cursor from calibre.gui2.tweak_book.widgets import Dialog, PlainTextEdit from calibre.utils.config import JSONConfig from calibre.utils.icu import string_length as strlen +from calibre.utils.localization import localize_user_manual_link string_length = lambda x: strlen(unicode(x)) # Needed on narrow python builds, as subclasses of unicode dont work @@ -54,7 +55,7 @@ obtain some advantage from it? But.

snip_key('<<', 'html', 'xml'): { 'description': _('Insert a tag'), - 'template': '<$1>${2*}', + 'template': '<$1>${2*}$3', }, snip_key('<>', 'html', 'xml'): { @@ -64,7 +65,7 @@ obtain some advantage from it? But.

snip_key('${2*}', + 'template': '${2*}$3', }, snip_key(' snip_key('${3*}', + 'template': '<$1 class="${2:classname}">${3*}$4', }, } # }}} @@ -446,6 +447,10 @@ class EditSnippet(QWidget): self.heading = la = QLabel('

\xa0') add_row(la) + self.helpl = la = QLabel(_('For help with snippets, see the User Manual') % + localize_user_manual_link('http://manual.calibre-ebook.com/snippets.html')) + la.setOpenExternalLinks(True) + add_row(la) self.name = n = QLineEdit(self) n.setPlaceholderText(_('The name of this snippet'))