/[suikacvs]/markup/wwwwwwwwwww/demo.ja.html
Suika

Contents of /markup/wwwwwwwwwww/demo.ja.html

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (hide annotations) (download) (as text)
Sat Jun 20 12:30:48 2009 UTC (14 years, 11 months ago) by wakaba
Branch: MAIN
CVS Tags: HEAD
File MIME type: text/html
new

1 wakaba 1.1 <!DOCTYPE HTML>
2     <title>$B$A$g(Bwwwwwwwwwww $B$J$s$>$3$l(Bwwwwwwwwwww</title>
3     <link rel=stylesheet href="http://suika.fam.cx/www/style/html/xhtml">
4     <style>
5     textarea {
6     min-height: 10em;
7     }
8     </style>
9     <script>
10     function htescape (s) {
11     return s.replace (/&/g, '&amp;').replace (/</g, '&lt;').replace (/"/g, '&quot;');
12     } // htescape
13    
14     function wwwwwwwwwww2html (s) {
15     s = s.split (/(\s+)/);
16     var r = ['<!DOCTYPE HTML>'];
17     var tagNames = [];
18    
19     for (var i = 0; i < s.length; i++) {
20     var token = s[i];
21     var tagName;
22     var attrs = {};
23    
24     if (/^[w$B#w(B]+[^w$B#w(B]/.test (token)) {
25     token = token.replace (/^[w$B#w(B]+([^w$B#w(B]+)[w$B#w(B]+/, function (_, t) {
26     tagName = t;
27     return '';
28     });
29    
30     token = token.replace (/^[w$B#w(B]*[v$B#v(B]([^v$B#v(B]*)[v$B#v(B](?:([^v$B#v(B]*)[v$B#v(B])?/g, function (_, n, v) {
31     attrs[n] = v;
32     return '';
33     });
34    
35     var tag = '<' + tagName;
36     for (var n in attrs) {
37     tag += ' ' + n + '="' + htescape (attrs[n]) + '"';
38     }
39     tag += '>';
40     r.push (tag);
41    
42     if ({
43     p: true, li: true, dt: true, dd: true, div: true, table: true,
44     ul: true, ol: true, dl: true, pre: true, form: true,
45     h1: true, h2: true, h3: true, h4: true, h5: true, h6: true,
46     section: true, article: true, header: true, hgroup: true,
47     footer: true, nav: true, aside: true
48     }[tagName] && {p: true, li: true, dt: true, dd: true}[tagNames[tagNames.length - 1]]) {
49     tagNames.pop ();
50     }
51     tagNames.push (tagName);
52     } else if (/^w+$/.test (token)) {
53     r.push ('</' + tagNames.pop () + '>');
54     } else {
55     r.push (htescape (token));
56     }
57     }
58    
59     return r.join ('');
60     } // wwwwwwwwwww2html
61    
62     function update () {
63     document.getElementById ('html').innerHTML = htescape (wwwwwwwwwww2html (document.getElementById ('wwwwwwwwwww').value));
64     }
65    
66     window.onload = update;
67     </script>
68    
69     <body class=has-abstract>
70    
71     <h1>wwwwwwwwwww</h1>
72    
73     <h2>$B%=!<%9(Bwwwwwwwwwwwwwwwwwwwwww</h2>
74    
75     <textarea id=wwwwwwwwwww onchange=" update () ">
76     wwwwhtmlwwwwvlangvja-2chvwwww
77     wwwwwwwwwwwheadwwwwwwwww
78     wwwwwwtitlewwwwwwwww $B$A$g(Bwwwwwwwwwwww $B$J$s$>$3$l(Bwwwwwwwwwwwwww wwwwwwwwwwwwwwww
79     wwwwwwwwwwwwwwwwwwwwwwww
80     wwwwwwwwwwbodywwwwwwwwww
81     wwwwwwwwwwh1wwwwwwwwwww
82     $B$A$g#w#w#w#w#w#w#w#w#w#w#w#w#w#w(B $B$J$s$>$3$l#w#w#w#w#w$C$&$'#w$C$&$'#w(B
83     wwwwwwwwwwwwwwwwwwwwwww
84    
85     $B#w#w#w#w#w#w#w#w#w#w#w#w#w(Bp$B#w#w#w#w#w#w#w#w(B $B$&#w#w#w#w$C$&$'$&$'$&$'#w#w#w#w#w#w#w#w(B
86     wwwwwwwwwwwwwwwwwwwpwwwwwwwwwwwwwwwwwwwww $B%F%i%+%*%9(Bwwwwwwwww $B$J$K$3$l#w#w#w#w#w#w#w(B
87    
88     $B#w#w#w#w#w#w#w#w#w#w#w#w#w(Bulwwwwwwwww
89     wwwwwwwwwwwwwwwwliwwwwwwwww $B$"$o$o$"$o$o(Bwwwwwww $B$3$l$O$R$I$$(Bwwwwwwwww
90     wwwwwwwwwwwwwwwliwwwwwwwwww $B$$$_$U(Bwwwwwwww wwwwwwwww
91     wwwwwwwwwwliwwwwwwwwww $B:#KL;:6H(Bwwwwwwwww wwwww
92     wwwwwwwwwww
93    
94     wwwwwwwwwwwwwwawwwwvhrefvhttp://www.google.com/vwwwwww $B$0$0$l%+%9(Bwwwwwwwwwwwwww wwww
95     wwwwwwwwwwwwwwwwwwwwwwww
96     wwwwwwwwwwwwwwwww
97     </textarea>
98    
99     <h2>HTMLwwwwwwwwwww $BJQ497k2L(Bwwwwwwwwwwwwwwwwwwwwww</h2>
100    
101     <pre id=html></pre>
102    
103     <h2>$BJ8K!(Bwwwwwwwwwww</h2>
104    
105     <pre>
106     wwwwwwwwwww := element *s
107     element := stag content etag
108     stag := 1*s 1*w tagname 1*w [attrs 1*w]
109     etag := 1*s 1*w
110     tagname := 1*&lt;w, s $B0J30(B>
111     attrs := *attr
112     attr := v attr-name v [attr-value v]
113     attr-name := 1*&lt;v, s $B0J30(B>
114     attr-value := 1*&lt;v, s $B0J30(B>
115     content := *(1*s &lt;w, s $B0J30(B> *&lt;s $B0J30(B> / element)
116     s := &lt;JavaScript /\s/>
117     w := "w" / "$B#w(B"
118     v := "v" / "$B#v(B"
119     </pre>
120    
121     <p>$B$?$@$7(Bwwwwww
122     <ul>
123     <li>$B:G=i$N%?%0$NA0$N(B 1*s $B$O>JN,2DG=(Bwwwwwwwwwwww
124     <li>p, div, ul $B$J$I0lIt%?%0$NA0$N(B etag $B$O!"$=$l$,(B p$B!"(Bli$B!"(Bdt$B!"(Bdd $B$N$$$:$l$+$NMWAG$N=*N;$r$"$i$o$9$J$i>JN,2DG=(Bwwwwwww
125     </ul>

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24