Closed aeosynth closed 14 years ago
haml-js treats script tags as self closing, but <script /> does not work; script tags need to be closed with </script>.
<script />
</script>
I wrote a simple test app, which displays a link at '/', but nowhere else.
app.js var haml = require('./lib/haml'); var file = require('file'); var http = require('http');
http.createServer(function (req, res) { file.read('app.haml').addCallback(function (source) { var body = haml.render(source, { locals: { url: req.url } }); res.sendHeader(200, {'Content-Type': 'text/html'}); res.sendBody(body); res.finish(); }); }).listen(8000);
app.haml %html %head :if url !='/' %script %body %a{ href: 'link' } link
$ node -v; git branch -v
0.1.25
edit: I tried this on Chrome and it works fine, but Opera/Firefox don't display.
Fixed, thanks for finding the regression.
haml-js treats script tags as self closing, but
<script />
does not work; script tags need to be closed with</script>
.I wrote a simple test app, which displays a link at '/', but nowhere else.
app.js var haml = require('./lib/haml'); var file = require('file'); var http = require('http');
app.haml %html %head :if url !='/' %script %body %a{ href: 'link' } link
$ node -v; git branch -v
0.1.25
edit: I tried this on Chrome and it works fine, but Opera/Firefox don't display.