added support for two new ezc statements for clearing/trimming text nodes

[ezc clear_all_white_nodes "yes"]...[end] - will clear a text node if the text consists of only white characters
[ezc trim_text_nodes "yes"]...[end] - will trim text nodes (removes white characters at the beginning and at the end)

"yes" is assumed by default if not present, also "no" can be specified to change the behavior
This commit is contained in:
2021-06-29 23:38:38 +02:00
parent c2283f70d4
commit acb42f453c
3 changed files with 139 additions and 16 deletions

View File

@@ -2441,7 +2441,15 @@ template<class StreamType>
void Generator<StreamType>::MakeTextEzc(Item & item)
{
if( item.function.name == L"frame" )
{
MakeEzcFrame(item);
}
else
if( item.function.name == L"clear_all_white_nodes" || item.function.name == L"trim_text_nodes" )
{
// text nodes are already cleared/trimmed by PatternParser
MakeTextContainer(item);
}
// in the future we can use more builtin functions
}