/
markup.nu
56 lines (52 loc) · 1.09 KB
/
markup.nu
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
;; requires Nunja
(load "Nunja")
(set &html (NunjaMarkupOperator operatorWithTag:"html" prefix:<<-END
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
END))
(global XMLNS "http://www.w3.org/1999/xhtml")
(macro markup (*names)
`(progn
(',*names each:
(do (name)
(set stringName (name stringValue))
(set expression
(list 'global ((+ "&" stringName) symbolValue) '(NunjaMarkupOperator operatorWithTag:stringName)))
(eval expression)))))
# add tags as needed
(markup a
body
br
button
div
fieldset
form
head
h1
h2
h3
h4
h5
h6
img
input
label
li
link
meta
ol
option
p
pre
script
select
span
strong
style
table
td
textarea
th
title
tr
tbody
ul)