【问题标题】:unexpected token " in pug before body tag意外标记“在身体标签之前的哈巴狗
【发布时间】:2017-04-14 16:41:39
【问题描述】:

Pug 太荒谬了,我根本无法发现错误。以下是我的完整哈巴狗文件。

html
    head
        meta(charset="utf-8")
        meta(http-equiv="X-UA-Compatible",content="IE=edge")
        meta(name="viewport", content="width=device-width, initial-scale=1")
        script(src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.0.0-alpha.6/js/bootstrap.min.js")
        script(src="ga.js")
        link(rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-material-design/4.0.2/bootstrap-material-design.min.css")
        link(rel="stylesheet" href="app.css")
        title= "my title"
    body                        
        .container
            .row
                .col-md-12
                    h1="My h1 tag"

【问题讨论】:

  • Pug 的当前 NPM 版本对该模板没有任何问题。

标签: html express pug


【解决方案1】:

这些行不需要“=”:title= "my title" 应该是 title my titleh1="My h1 tag" 应该是 h1 My h1 tag

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2018-09-25
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-10-20
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多