--- a/QScintilla/MarkupProviders/RestructuredTextProvider.py Fri Jan 06 18:28:14 2017 +0100 +++ b/QScintilla/MarkupProviders/RestructuredTextProvider.py Fri Jan 06 20:00:52 2017 +0100 @@ -42,6 +42,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("**", editor) + def hasItalic(self): """ Public method to indicate the availability of italic markup. @@ -51,6 +60,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("*", editor) + def headerLevels(self): """ Public method to determine the available header levels. @@ -60,24 +78,6 @@ """ return len(self.__headerChars) - def bold(self, editor): - """ - Public method to generate bold text. - - @param editor reference to the editor to work on - @type Editor - """ - self.__insertMarkup("**", editor) - - def italic(self, editor): - """ - Public method to generate italic text. - - @param editor reference to the editor to work on - @type Editor - """ - self.__insertMarkup("*", editor) - def header(self, editor, level): """ Public method to generate a header. @@ -102,6 +102,24 @@ editor.setCursorPosition(cline + 2, 0) editor.endUndoAction() + 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("``", editor) + def __insertMarkup(self, markup, editor): """ Private method to insert the specified markup.