• unexpected token "indent"


    1、错误描述

    F:dojoabcdabccviewsloginlogin.pug:3:1 1| doctype html 2| > 3| h1= title -------^ 4| p Welcome to #{title} 5| div(class='div_style') unexpected token "indent"
    Error: F:dojoabcdabccviewsloginlogin.pug:3:1
        1| doctype html
        2| 
      > 3|   h1= title
    -------^
        4|   p Welcome to #{title}
        5|   div(class='div_style')
    
    unexpected token "indent"
        at makeError (F:dojoabcdabcc
    ode_modulespug-errorindex.js:32:13)
        at Parser.error (F:dojoabcdabcc
    ode_modulespug-parserindex.js:53:15)
        at Parser.parseExpr (F:dojoabcdabcc
    ode_modulespug-parserindex.js:257:14)
        at Parser.parse (F:dojoabcdabcc
    ode_modulespug-parserindex.js:112:25)
        at parse (F:dojoabcdabcc
    ode_modulespug-parserindex.js:12:20)
        at Object.parse (F:dojoabcdabcc
    ode_modulespuglibindex.js:126:22)
        at Function.loadString [as string] (F:dojoabcdabcc
    ode_modulespug-loadindex.js:45:21)
        at compileBody (F:dojoabcdabcc
    ode_modulespuglibindex.js:86:18)
        at Object.exports.compile (F:dojoabcdabcc
    ode_modulespuglibindex.js:243:16)
        at handleTemplateCache (F:dojoabcdabcc
    ode_modulespuglibindex.js:216:25)

    2、错误原因

         在主体内容前,需要添加block content,用作标识开始

    doctype html
    
      h1= title
      p Welcome to #{title}
      div(class='div_style')

    3、解决办法

    doctype html
    
    block content
      h1= title
      p Welcome to #{title}
      div(class='div_style')
  • 相关阅读:
    vue 循环Redio
    vue 子组件修改父组件变量问题
    docker安装redis
    vue 复制内容到粘贴板
    vue 组件传值
    vscode 打开多个标签页
    asp.net 文件分片上传
    css之图片下方定位遮掩层
    Python发送邮件脚本
    git添加秘钥提示Key is already in use
  • 原文地址:https://www.cnblogs.com/hzcya1995/p/13313738.html
Copyright © 2020-2023  润新知