From cf52542fcff37f5cb0d082538fdae2b9c6c85a02 Mon Sep 17 00:00:00 2001 From: Maciej Date: Thu, 27 Apr 2023 12:52:01 +0200 Subject: LibMarkdown+LibSyntax: Add a Markdown syntax highlighter It currently supports only headers and code blocks. --- Userland/DevTools/HackStudio/Editor.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'Userland/DevTools') diff --git a/Userland/DevTools/HackStudio/Editor.cpp b/Userland/DevTools/HackStudio/Editor.cpp index 1aa190ef41..4addf01f0e 100644 --- a/Userland/DevTools/HackStudio/Editor.cpp +++ b/Userland/DevTools/HackStudio/Editor.cpp @@ -34,6 +34,7 @@ #include #include #include +#include #include #include #include @@ -653,11 +654,14 @@ void Editor::set_syntax_highlighter_for(CodeDocument const& document) case Syntax::Language::HTML: set_syntax_highlighter(make()); break; + case Syntax::Language::INI: + set_syntax_highlighter(make()); + break; case Syntax::Language::JavaScript: set_syntax_highlighter(make()); break; - case Syntax::Language::INI: - set_syntax_highlighter(make()); + case Syntax::Language::Markdown: + set_syntax_highlighter(make()); break; case Syntax::Language::Shell: set_syntax_highlighter(make()); -- cgit v1.2.3