nitlanguage
/
nit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
lib: fix some nitunit tests, thanks to the new features of the tool
[nit.git]
/
lib
/
template.nit
diff --git
a/lib/template.nit
b/lib/template.nit
index
9608f49
..
d254c24
100644
(file)
--- a/
lib/template.nit
+++ b/
lib/template.nit
@@
-67,18
+67,22
@@
module template
#
# class LnkTmpl
# super Template
#
# class LnkTmpl
# super Template
-# var text: Template
+# var text: Streamable
# var title: nullable String
# var href: String
# redef fun rendering do
# var title: nullable String
# var href: String
# redef fun rendering do
-# add """<a href="{{{href.html_escape}}}" """
-# if title != null then add """title="{{{title.html_escape}}}" """
+# add """<a href="{{{href.html_escape}}}""""
+# if title != null then add """ title="{{{title.html_escape}}}""""
# add ">"
# add text
# add "</a>"
# end
# # ...
# end
# add ">"
# add text
# add "</a>"
# end
# # ...
# end
+# var l = new LnkTmpl
+# l.text = "hello world"
+# l.href = "hello.png"
+# assert l.write_to_string == """<a href="hello.png">hello world</a>"""
#
class Template
super Streamable
#
class Template
super Streamable