diff options
author | Dimitri van Heesch <dimitri@stack.nl> | 2015-01-01 09:13:04 (GMT) |
---|---|---|
committer | Dimitri van Heesch <dimitri@stack.nl> | 2015-08-27 13:43:31 (GMT) |
commit | 56987af3987f40ac77e70cd39ebbdac3702c1ce2 (patch) | |
tree | 441fe1be085e1e83c4a08f3e7ad2ab8681fec045 /src/template.cpp | |
parent | f16c156065ac8bc6242870c2ae701252b5d4f9b2 (diff) | |
download | Doxygen-56987af3987f40ac77e70cd39ebbdac3702c1ce2.zip Doxygen-56987af3987f40ac77e70cd39ebbdac3702c1ce2.tar.gz Doxygen-56987af3987f40ac77e70cd39ebbdac3702c1ce2.tar.bz2 |
Add mathjax support to template & context.
Diffstat (limited to 'src/template.cpp')
-rw-r--r-- | src/template.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/template.cpp b/src/template.cpp index ce9493b..e81ed17 100644 --- a/src/template.cpp +++ b/src/template.cpp @@ -1116,6 +1116,25 @@ class FilterGroupBy //-------------------------------------------------------------------- +/** @brief The implementation of the "relative" filter */ +class FilterRelative +{ + public: + static TemplateVariant apply(const TemplateVariant &v,const TemplateVariant &) + { + if (v.isValid() && v.type()==TemplateVariant::String && v.toString().left(2)=="..") + { + return TRUE; + } + else + { + return FALSE; + } + } +}; + +//-------------------------------------------------------------------- + /** @brief The implementation of the "paginate" filter */ class FilterPaginate { @@ -1416,6 +1435,7 @@ static TemplateFilterFactory::AutoRegister<FilterFlatten> fFlatten("flatten" static TemplateFilterFactory::AutoRegister<FilterDefault> fDefault("default"); static TemplateFilterFactory::AutoRegister<FilterPrepend> fPrepend("prepend"); static TemplateFilterFactory::AutoRegister<FilterGroupBy> fGroupBy("groupBy"); +static TemplateFilterFactory::AutoRegister<FilterRelative> fRelative("relative"); static TemplateFilterFactory::AutoRegister<FilterListSort> fListSort("listsort"); static TemplateFilterFactory::AutoRegister<FilterPaginate> fPaginate("paginate"); static TemplateFilterFactory::AutoRegister<FilterStripPath> fStripPath("stripPath"); |