Jade - Jade 文件第 x 行文本前缺少空格 [英] Jade - missing space before text for line x of jade file

查看:57
本文介绍了Jade - Jade 文件第 x 行文本前缺少空格的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在制作一个基于 Express 的网络应用程序,每次有人访问这个 jade 文件时,我都会收到以下错误:

I'm making an Express based web application and everytime someone visits this jade file i get the following error:

Warning: missing space before text for line 28 of jade file "C:\x\app\view
s\login.jade"

它还会为它发生的每一行吐出几次.

It also spits it out a few times for each line it happens on.

我查看了这些行,但不知道它在抱怨什么.

I took a look at these lines and I can not figure out what it's complaining about.

我的玉文件如下:

doctype html
html
    head
        meta(charset='utf-8')
        link(href='style.css', rel='stylesheet')
    body
        .wrapper
            header.header
                a(href="/", style="color: #000000;")
                    h1(style="position: absolute; top: 30px;") Hello
            .middle
                .container
                    main.stream
                        p Login
                    main.name
                        form(id="login",    method="POST", action="/login")
                            table(cellspacing="15")
                                tr
                                    td Email
                                    td
                                        input(type='email', name='email' style="width: 250; height: 18px; border: 1px solid #999999; padding: 5px;")
                                tr
                                    td Password
                                    td
                                        input(type='password', name='password' style="width: 250; height: 18px; border: 1px solid #999999; padding: 5px;")
                                tr
                                    td
                                        input(style="width:75px;height:30px;", type="submit", value="Login")    

                aside.left-sidebar
                    main.dir
                        a(href="/") Home
                    main.dir
                        a(href="/signup")   Register                        
        footer.footer
            h3 Hello
            p This is a footer

推荐答案

在 Jade 中使用 |仅以文本开头时

In Jade use | when start with only text

错误 ->

td
  {{anything}}
  br
  Hello

正确 ->

td
  | {{anything}}
  br
  | Hello

这篇关于Jade - Jade 文件第 x 行文本前缺少空格的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆