From 559fa157afd2a5ff110bb99ddc666ef54dcdc140 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mart=C3=ADn=20Lucas=20Golini?= Date: Wed, 19 Mar 2025 01:21:29 -0300 Subject: [PATCH] Fix language export. --- src/tools/ecode/ecode.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/tools/ecode/ecode.cpp b/src/tools/ecode/ecode.cpp index 1c21e11b5..cffb4581f 100644 --- a/src/tools/ecode/ecode.cpp +++ b/src/tools/ecode/ecode.cpp @@ -4059,6 +4059,7 @@ void App::init( const LogLevel& logLevel, std::string file, const Float& pidelDe } static void exportLanguages( const std::string& path, const std::string& langs ) { + Language::LanguagesSyntaxHighlighting::load(); SyntaxDefinitionManager* sdm = SyntaxDefinitionManager::instance(); std::vector defs; @@ -4070,14 +4071,14 @@ static void exportLanguages( const std::string& path, const std::string& langs ) for ( const auto& l : langss ) { const auto& sd = sdm->getByLSPName( l ); - if ( !sd.getLanguageName().empty() ) { + if ( !sd.getPatterns().empty() ) { defs.push_back( sd ); continue; } - const auto& sd2 = sdm->getByLanguageName( l ); + const auto& sd2 = sdm->getByLanguageNameInsensitive( l ); - if ( !sd2.getLanguageName().empty() ) + if ( !sd2.getPatterns().empty() ) defs.push_back( sd2 ); } }