summaryrefslogtreecommitdiff
path: root/server/src/formattools.cc
diff options
context:
space:
mode:
authordeva <deva>2008-11-03 15:22:10 +0000
committerdeva <deva>2008-11-03 15:22:10 +0000
commit40bad69cd77f32730f6939553d7f9667338c646f (patch)
tree7a5b83aac4aef71a718f9aaa806feaedf8d25a4b /server/src/formattools.cc
parent5968c3af2c26abe61cf98bf45f672835ef4b51ba (diff)
Did a lot of work on format utils.
Diffstat (limited to 'server/src/formattools.cc')
-rw-r--r--server/src/formattools.cc10
1 files changed, 8 insertions, 2 deletions
diff --git a/server/src/formattools.cc b/server/src/formattools.cc
index b90ca51..63cfec6 100644
--- a/server/src/formattools.cc
+++ b/server/src/formattools.cc
@@ -192,13 +192,19 @@ int main()
Fields fields;
fields["dingo"] = "[[meget dyr]]";
fields["fnuld"] = "Zimbabwe";
+ fields["mlstring"] = "Ladidaa ${foo|bar} ${{dingo|dyt}} ${dims|dulle}.";
printf("%s\n", deescape_string(deescape_string("[[] []]", '['), ']').c_str());
if(escape_multilist_string("${} {{}}") != "${{}} {{{{}}}}") return 1;
if(escape_resume_string("$[] [[]]") != "$[[]] [[[[]]]]") return 1;
- printf("{%s}\n", render_multilist_string("Ladidaa ${foo|bar} ${{dingo|dyt}} ${dims|dulle}.").c_str());
- printf("{%s}\n", render_resume_string("Ladidaa $[return 'dims' .. dingo] $[[et eller andet]] $[return 'noget andet'].", fields).c_str());
+
+ std::string mlstring = "Ladidaa ${foo|bar} ${{dingo|dyt}} ${dims|dulle}.";
+ printf("{%s}\n", render_multilist_string(mlstring).c_str());
+
+ // std::string resumestring = "Ladidaa $[printval('dims' .. dingo)] $[[et eller andet]] $[printval('noget andet')].";
+ std::string resumestring = "Ladidaa \n$[printfmlval('mlstring', ' * ', true, '<p>', 'myname', '</p>')] dalidaadoo.";
+ printf("{%s}\n", render_resume_string(resumestring, fields).c_str());
return 0;
}