SparkViewEngine / spark

Spark is a view engine for ASP.NET MVC and Castle Project MonoRail frameworks. The idea is to allow the html to dominate the flow and any code to fit seamlessly.
Apache License 2.0
260 stars 86 forks source link

Rendering *.shade with NancyFX #34

Closed jchannon closed 2 years ago

jchannon commented 11 years ago

Hi I'm having a few issues.

Here is my file:

doctype 5
html(lang="en")
    meta charset="utf-8"
    title Jade
    link href="~/Content/Site.css" rel="stylesheet" type="text/css"
    script src="~/Scripts/jquery-1.5.1.min.js" type="text/javascript" | 
    script src="~/Scripts/modernizr-1.7.min.js" type="text/javascript" | 
body
     .container
        p Hi There

It does not like the doctype5 or the parentheses around the html node.

On the title tag and the p tag they get rendered (once I remove the doctype5 and lang) like so <title><Jade/></title> and <p><Hi><There/></Hi></p>

The above may be a parser error so possibly this is one also.

In the Nancy tests you use this as an example:

html
    head
        title |offset test
     body
        .container
            h1#top |offset test

You assert that the title should render like <title>offset test</title> which is fine but you shouldn't need to use the pipe (|) character after the "title" keyword. The same with the h1 declaration. Jade states you should type the tag and then anything after it:

Simply place some content after the tag:

p wahoo! renders <p>wahoo!</p>

bounav commented 2 years ago

Has this issue go anything to do with spark view engine?

I'm closing this ticket. Please comment back if you think I shouldn't have.