-
Notifications
You must be signed in to change notification settings - Fork 5
Text & HTML
James Padolsey edited this page May 21, 2013
·
3 revisions
SIML allows you to specify text using regular quoted strings:
NOTE: All regular text has the following characters escaped: >
, <
, "
, &
.
title 'The title'
Or:
title "The title"
(Generating)
<title>The title</title>
Text is treated as a descendant of the element, so you can nest it like so:
div {
'some interesting text... '
"some more..."
}
There is a also a text
attribute if you wish to be more explicit:
div {
text: 'some text...';
//...
"This will just be appended"
}
Another example:
ul {
li a 'link1'
li a 'link2'
li a 'link3'
li a 'link4'
}
(which generates):
<ul>
<li><a>link1</a></li>
<li><a>link2</a></li>
<li><a>link3</a></li>
<li><a>link4</a></li>
</ul>
body '''
Here is some here text ...
'I can use quotes within...'
<html> is escaped!
'''
To "break out" of SIML and use regular HTML simply use the back-tick delimiter (can also be in here-doc style):
body ```
<strong>Actual HTML!</strong>
```
body `<span>Single line <em>HTML!!</em></span>`