--- a/QScintilla/Lexers/__init__.py Mon Jan 16 18:49:51 2017 +0100 +++ b/QScintilla/Lexers/__init__.py Mon Jan 16 20:03:48 2017 +0100 @@ -162,6 +162,9 @@ supportedLanguages["JSON"] = \ [QCoreApplication.translate('Lexers', "JSON"), 'dummy.json', "lexerJSON.png"] + supportedLanguages["Markdown"] = \ + [QCoreApplication.translate('Lexers', "Markdown"), + 'dummy.md', "lexerMarkdown.png"] for name in LexerRegistry: if not name.startswith("Pygments|"): @@ -323,6 +326,9 @@ elif language == "JSON": from .LexerJSON import LexerJSON return LexerJSON(parent) + elif language == "Markdown": + from .LexerMarkdown import LexerMarkdown + return LexerMarkdown(parent) elif language in LexerRegistry: return LexerRegistry[language][2](parent) @@ -505,6 +511,11 @@ 'Lexers', 'JSON Files (*.json)'), ) + openFileFiltersList.append( + QCoreApplication.translate( + 'Lexers', + 'Markdown Files (*.md)'), + ) for name in LexerRegistry: openFileFiltersList.extend(LexerRegistry[name][3]) @@ -713,6 +724,11 @@ 'Lexers', 'JSON Files (*.json)'), ) + saveFileFiltersList.append( + QCoreApplication.translate( + 'Lexers', + 'Markdown Files (*.md)'), + ) for name in LexerRegistry: saveFileFiltersList.extend(LexerRegistry[name][4]) @@ -871,6 +887,7 @@ if QSCINTILLA_VERSION() >= 0x020a00: assocs['*.json'] = "JSON" + assocs['*.md'] = "Markdown" for name in LexerRegistry: for pattern in LexerRegistry[name][5]: