--- a/QScintilla/MarkupProviders/HtmlProvider.py Fri Jan 06 18:28:14 2017 +0100 +++ b/QScintilla/MarkupProviders/HtmlProvider.py Fri Jan 06 20:00:52 2017 +0100 @@ -40,6 +40,15 @@ """ return True + def bold(self, editor): + """ + Public method to generate bold text. + + @param editor reference to the editor to work on + @type Editor + """ + self.__insertMarkup("b", editor) + def hasItalic(self): """ Public method to indicate the availability of italic markup. @@ -49,6 +58,15 @@ """ return True + def italic(self, editor): + """ + Public method to generate italic text. + + @param editor reference to the editor to work on + @type Editor + """ + self.__insertMarkup("i", editor) + def hasStrikethrough(self): """ Public method to indicate the availability of strikethrough markup. @@ -58,6 +76,15 @@ """ return True + def strikethrough(self, editor): + """ + Public method to generate strikethrough text. + + @param editor reference to the editor to work on + @type Editor + """ + self.__insertMarkup("del", editor) + def headerLevels(self): """ Public method to determine the available header levels. @@ -67,33 +94,6 @@ """ return 6 - def bold(self, editor): - """ - Public method to generate bold text. - - @param editor reference to the editor to work on - @type Editor - """ - self.__insertMarkup("b", editor) - - def italic(self, editor): - """ - Public method to generate italic text. - - @param editor reference to the editor to work on - @type Editor - """ - self.__insertMarkup("i", editor) - - def strikethrough(self, editor): - """ - Public method to generate strikethrough text. - - @param editor reference to the editor to work on - @type Editor - """ - self.__insertMarkup("del", editor) - def header(self, editor, level): """ Public method to generate a header. @@ -106,6 +106,24 @@ if level <= 6: self.__insertMarkup("h{0}".format(level), editor) + def hasCode(self): + """ + Public method to indicate the availability of inline code markup. + + @return flag indicating the availability of inline code markup + @rtype bool + """ + return True + + def code(self, editor): + """ + Public method to generate inline code text. + + @param editor reference to the editor to work on + @type Editor + """ + self.__insertMarkup("code", editor) + def __insertMarkup(self, markup, editor): """ Private method to insert the specified markup.