Commit fea99e38 authored by saalen's avatar saalen

renamed ConfigOverride to GeneratorOverride

git-svn-id: https://svn.code.sf.net/p/syntaxhighlight/code@199 b214f192-c5d8-4e29-a392-b12ed3af51bf
parent 696d90df
......@@ -7,9 +7,11 @@ xx.03.2017
-fixed code folding plugin to support more Ruby conditional modifiers (thanks to Jens Schleusener)
-fixed Perl quoted string highlighting (thanks to Jens Schleusener)
-added new GeneratorOverride syntax definition parameter
-added Filenames parameter in filetypes.conf to assign input filenames to syntax types
(suggested by Andy)
-added FASM definition and edit-fasm theme (thanks to Tristano Ajmone)
-added outhtml_ie7_webctrl plug-in (suggested by Tristano Ajmone)
-GUI: file extensions can be configured for multiple languages, triggers syntax selection prompt
---
......
......@@ -10,8 +10,9 @@ function syntaxUpdate(desc)
end
-- new element; subject to change
ConfigOverride = {
{ Spacer=" " },
GeneratorOverride = {
{ Param="Spacer", Value=" " },
{ Param="MaskWS", Value="true" },
}
function DecorateLineBegin(lineNumber)
......
......@@ -2,7 +2,7 @@
main.cpp - description
-------------------
begin : Die Apr 23 22:16:35 CEST 2002
copyright : (C) 2002-2016 by Andre Simon
copyright : (C) 2002-2017 by Andre Simon
email : andre.simon1@gmx.de
Highlight is a universal source code to HTML converter. Syntax highlighting
......
......@@ -594,18 +594,14 @@ State CodeGenerator::validateState(State newState, State oldState, unsigned int
token=token.substr(0, 1);
return oldState;
}
// if (validatedState!=STANDARD) {
stateTrace.push_back(validatedState);
if (stateTrace.size()>200) stateTrace.erase(stateTrace.begin(), stateTrace.begin() + 100 );
// }
stateTrace.push_back(validatedState);
if (stateTrace.size()>200) stateTrace.erase(stateTrace.begin(), stateTrace.begin() + 100 );
return validatedState;
}
}
resultOfHook = false;
// if (newState!=STANDARD) {
stateTrace.push_back(newState);
if (stateTrace.size()>200) stateTrace.erase(stateTrace.begin(), stateTrace.begin() + 100 );
// }
stateTrace.push_back(newState);
if (stateTrace.size()>200) stateTrace.erase(stateTrace.begin(), stateTrace.begin() + 100 );
return newState;
}
......@@ -761,7 +757,10 @@ LoadResult CodeGenerator::loadLanguage ( const string& langDefPath, bool embedde
string overrideSpacer(currentSyntax->getOverrideConfigVal("spacer"));
if (!overrideSpacer.empty()) {
spacer = overrideSpacer;
maskWs = true;
}
string overrideMaskWS(currentSyntax->getOverrideConfigVal("maskws"));
if (!overrideMaskWS.empty()) {
maskWs = overrideMaskWS=="true";
}
}
......
......@@ -207,16 +207,13 @@ LoadResult SyntaxReader::load ( const string& langDefPath, const string& pluginR
idx++;
}
//test balloon
//TODO: maskWS, format specific attributes
if (globals.count("ConfigOverride")) {
if (globals.count("GeneratorOverride")) {
idx=1;
while (ls["ConfigOverride"][idx].value() !=Diluculum::Nil) {
Diluculum::LuaValue lVal = ls["ConfigOverride"][idx]["Spacer"].value();
if (lVal != Diluculum::Nil){
pluginConfigOverride["spacer"] = lVal.asString();
}
Diluculum::LuaValue lVal = ls["GeneratorOverride"][idx].value();
while (lVal !=Diluculum::Nil) {
pluginConfigOverride[StringTools::change_case(lVal["Param"].asString())] = lVal["Value"].asString();
idx++;
lVal = ls["GeneratorOverride"][idx].value();
}
}
......
......@@ -505,7 +505,7 @@ protected:
/** Test if maskWsBegin and maskWsEnd should be applied */
bool maskWs;
/** Test if whitespace sould always be separated from enclosing tokens */
/** Test if whitespace should always be separated from enclosing tokens */
bool excludeWs;
/** Test if header and footer should be omitted */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment