renamed: config option 'html_filter_break_lines' to 'html_filter_break_word'
added: config option 'html_filter_wrap_line'
this wraps the whole line (line calculated with html tags as well)
changed: orphans (for html filter) are read from locale files now
('language_orphans' value )
git-svn-id: svn://ttmath.org/publicrep/winix/trunk@728 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
@@ -25,6 +25,7 @@ PatternCacher pattern_cacher; // patterns for user items (files with an exec
|
||||
Locale locale;
|
||||
EzcFun ezc_functions;
|
||||
LocaleFilter locale_filter;
|
||||
HTMLFilter html_filter;
|
||||
CKEditorGetParser ckeditor_getparser;
|
||||
|
||||
// used by GenerateRunRaw()
|
||||
@@ -500,6 +501,34 @@ using namespace TemplatesFunctions;
|
||||
}
|
||||
|
||||
|
||||
void Templates::SetHtmlFilter()
|
||||
{
|
||||
using namespace TemplatesFunctions;
|
||||
|
||||
html_filter.TrimWhite(config->html_filter_trim_white);
|
||||
html_filter.BreakWord(config->html_filter_break_word);
|
||||
html_filter.WrapLine(config->html_filter_wrap_line);
|
||||
html_filter.InsertTabs(config->html_filter_tabs);
|
||||
html_filter.ClearOrphans();
|
||||
|
||||
if( config->html_filter_orphans )
|
||||
{
|
||||
html_filter.OrphansMode(config->html_filter_orphans_mode);
|
||||
|
||||
for(size_t i=0 ; i<locale.Size() ; ++i)
|
||||
{
|
||||
if( locale.IsKeyLang(L"html_lang_attr_value", i) &&
|
||||
locale.IsKeyLangList(L"language_orphans", i) )
|
||||
{
|
||||
html_filter.AssignOrphans(locale.Get(L"html_lang_attr_value", i),
|
||||
locale.GetList(L"language_orphans", i));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
void Templates::ReadTemplates()
|
||||
{
|
||||
using namespace TemplatesFunctions;
|
||||
@@ -513,6 +542,8 @@ using namespace TemplatesFunctions;
|
||||
|
||||
ReadFunctionsTemplates();
|
||||
index_patterns.ReloadPatterns(locale, locale_filter, false);
|
||||
|
||||
SetHtmlFilter();
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user