警告:玉文件第 20 行文本前缺少空格 [英] Warning: missing space before text for line 20 of jade file

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

问题描述

我收到警告:玉文件第 20 行文本前缺少空格 此代码:

有什么想法吗?

doctype html
html(ng-app="fooApp")
    head
        title Foo
        script(language='javascript', src='bower_components/angular/angular.js', type='text/javascript')
        script(language='javascript', src='bower_components/requirejs/require.js', type='text/javascript', data-main='js/Main.js')
        script(language='javascript', src='http://cdn.peerjs.com/0.3/peer.js', type='text/javascript')
        script(language='javascript', src='bower_components/platform/platform.js', type='text/javascript')
        //link(rel="import", href="elements/elements.html" )
        link(rel="import", href="bower_components/polymer/polymer.html" )
        link(rel="import", href="bower_components/core-component-page/core-component-page.html" )



        link(rel='import', href='core-scaffold.html')
        link(rel='import', href='../core-header-panel/core-header-panel.html')
        link(rel='import', href='../core-menu/core-menu.html')
        link(rel='import', href='../core-item/core-item.html')
        style
            html, body {            <-- line 20
                height: 100%;
                margin: 0;
            }

推荐答案

尝试将 style 更改为 style..我的猜测是 Jade 试图解析您的 CSS 规则,但并不理解它,因为它是为浏览器而不是模板引擎编写的.

Try changing style to style.. My guess is that Jade tries to parse your CSS rule, and does not understand it, as it is something written for the browser and not for the template engine.

添加一个点 . 将告诉 Jade 按原样"呈现以下文本块,并且不要尝试解析它.

Adding a dot . will tell Jade to render the following block of text "as is", and to not try to parse it.

您可以在 Jade 参考资料 上阅读更多相关信息.希望有所帮助.

You can read more about it on Jade reference. Hope that helps.

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

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