7#include "skeleton_node.hpp"
9namespace hi::inline
v1 {
24 auto new_text_length = ssize(
text);
25 for (
auto i =
text.crbegin(); i !=
text.crend(); ++i, --new_text_length) {
26 if (*i ==
' ' || *i ==
'\t') {
29 }
else if (*i ==
'\n') {
37 text.resize(new_text_length);
42 return std::format(
"<text {}>",
text);
DOXYGEN BUG.
Definition algorithm.hpp:15
A dynamic data type.
Definition datum.hpp:225
Definition formula_evaluation_context.hpp:16
void write(std::string_view text) noexcept
Write data to the output.
Definition formula_evaluation_context.hpp:50
A variant of text.
Definition label.hpp:37
Definition parse_location.hpp:18
Definition skeleton_node.hpp:16
Definition skeleton_string_node.hpp:11
void left_align() noexcept override
Remove any trailing spaces or tabs after a new-line.
Definition skeleton_string_node.hpp:21
datum evaluate(formula_evaluation_context &context) override
Evaluate the template.
Definition skeleton_string_node.hpp:45
bool should_left_align() const noexcept override
Should any spaces on the left side of a statement be removed?
Definition skeleton_string_node.hpp:16