-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed an old bug in syntax highlighting that sometimes the first line…
… of the file was not correctly highlighted. Added Svelte syntax highlighting support. Improved CSS syntax highlighting. Added "Open All Files in Folder" option when right click a folder in the folder tree view.
- Loading branch information
Showing
11 changed files
with
251 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
72 changes: 72 additions & 0 deletions
72
src/modules/languages-syntax-highlighting/src/eepp/ui/doc/languages/svelte.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
#include <eepp/ui/doc/languages/svelte.hpp> | ||
#include <eepp/ui/doc/syntaxdefinitionmanager.hpp> | ||
|
||
namespace EE { namespace UI { namespace Doc { namespace Language { | ||
|
||
void addSvelte() { | ||
|
||
SyntaxDefinitionManager::instance() | ||
->add( | ||
|
||
{ "Svelte", | ||
{ "%.svelte$" }, | ||
{ | ||
{ { "<%s*[sS][cC][rR][iI][pP][tT]%s+[tT][yY][pP][eE]%s*=%s*['\"]%a+/" | ||
"[jJ][aA][vV][aA][sS][cC][rR][iI][pP][tT]['\"]%s*>", | ||
"<%s*/[sS][cC][rR][iI][pP][tT]>" }, | ||
"function", | ||
"JavaScript" }, | ||
{ { "<%s*[sS][cC][rR][iI][pP][tT]%s+([lL][aA][nN][gG])%s*(=)%s*(['\"][tT][sS]['" | ||
"\"])%s*>", | ||
"<%s*/[sS][cC][rR][iI][pP][tT]>" }, | ||
{ "function", "keyword", "operator", "string" }, | ||
"TypeScript" }, | ||
{ { "<%s*[sS][cC][rR][iI][pP][tT]%s*>", "<%s*/%s*[sS][cC][rR][iI][pP][tT]>" }, | ||
"function", | ||
"JavaScript" }, | ||
{ { "<%s*[sS][tT][yY][lL][eE][^>]*>", "<%s*/%s*[sS][tT][yY][lL][eE]%s*>" }, | ||
"function", | ||
"CSS" }, | ||
{ { "<!%-%-", "%-%->" }, "comment" }, | ||
{ { "\"", "\"", "\\" }, "string" }, | ||
{ { "'", "'", "\\" }, "string" }, | ||
{ { "{@html[^}]*}" }, "keyword", "", true }, | ||
{ { "{@debug[^}]*}" }, "keyword", "", true }, | ||
{ { "{(:else|:then|:catch)}" }, | ||
std::vector<std::string>{ "keyword", "keyword2" }, | ||
"", | ||
true }, | ||
{ { "{(/if|/each|/await|/key)}" }, | ||
std::vector<std::string>{ "keyword", "keyword2" }, | ||
"", | ||
true }, | ||
{ { "{(#if|#each|#await|#key)", "}", "\\" }, | ||
{ "keyword", "keyword2", "normal" }, | ||
"JavaScript", | ||
true }, | ||
{ { "{", "}", "\\" }, "keyword", "JavaScript" }, | ||
{ { "([%a_][%w_-]*)(:)([%a_][%w_-]*)(=)" }, | ||
{ "keyword", "keyword2", "normal", "keyword", "operator" } }, | ||
{ { "([%a_][%w_-]*)(=)" }, { "keyword", "keyword", "operator" } }, | ||
{ { "0x[%da-fA-F]+" }, "number" }, | ||
{ { "-?%d+[%d%.]*f?" }, "number" }, | ||
{ { "-?%.?%d+f?" }, "number" }, | ||
{ { "%f[^<][%a_][%w%_%-]*(:)([%w_-]+)" }, { "function", "normal", "keyword" } }, | ||
{ { "%f[^<]/[%a_][%w%_%-]*(:)([%w_-]+)" }, { "function", "normal", "keyword" } }, | ||
{ { "%f[^<]![%a_][%w%_%-]*" }, "keyword2" }, | ||
{ { "%f[^<][%a_][%w%_%-]*" }, "function" }, | ||
{ { "%f[^<]/[%a_][%w%_%-]*" }, "function" }, | ||
{ { "[/<>=]" }, "operator" }, | ||
|
||
}, | ||
{ | ||
|
||
}, | ||
"", | ||
{} | ||
|
||
} ) | ||
.setAutoCloseXMLTags( true ); | ||
} | ||
|
||
}}}} // namespace EE::UI::Doc::Language |
10 changes: 10 additions & 0 deletions
10
src/modules/languages-syntax-highlighting/src/eepp/ui/doc/languages/svelte.hpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#ifndef EE_UI_DOC_Svelte | ||
#define EE_UI_DOC_Svelte | ||
|
||
namespace EE { namespace UI { namespace Doc { namespace Language { | ||
|
||
extern void addSvelte(); | ||
|
||
}}}} // namespace EE::UI::Doc::Language | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters