Added comment support to inja templates in links and tooltips

This commit is contained in:
Bartek Kryza
2022-03-23 21:59:02 +01:00
parent 8c0486240f
commit eed9fcaf66
7 changed files with 145 additions and 22 deletions

View File

@@ -87,4 +87,11 @@ void decorated_element::append(const decorated_element &de)
decorators_.push_back(d);
}
}
std::optional<std::string> decorated_element::comment() const
{
return comment_;
}
void decorated_element::set_comment(const std::string &c) { comment_ = c; }
}

View File

@@ -22,6 +22,7 @@
#include "decorators/decorators.h"
#include <memory>
#include <optional>
#include <string>
#include <vector>
@@ -45,8 +46,13 @@ public:
void append(const decorated_element &de);
std::optional<std::string> comment() const;
void set_comment(const std::string &c);
private:
std::vector<std::shared_ptr<decorators::decorator>> decorators_;
std::optional<std::string> comment_;
};
}