Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error unexpected text when using jade

This is the error in my jade template:

     Error: E:\Do\hello_express\node_notes\views\simple.jade:6
    4|      meta(charset="utf-8")
    5|      meta(name="viewport",content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no")
  > 6|      meta(http-equiv="X-UA-Compatible",content="IE=edge")    
    7|      title= #{title}
    8|      link(rel='stylesheet',href='http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css')
    9|      link(rel='stylesheet',href='stylesheets/notes.css')

    unexpected text     
        t

My template looks like this:

html
    head
        meta(charset="utf-8")
        meta(name="viewport",content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no")
        meta(http-equiv="X-UA-Compatible",content="IE=edge")    
        title= #{title}
        link(rel='stylesheet',href='http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css')
        link(rel='stylesheet',href='stylesheets/notes.css')
        script(type='text/javascript',src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.1/jquery.min.js')
        script(type='text/javascript',src='http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js')
    body
        block content   
like image 355
vamsiampolu Avatar asked Dec 09 '22 07:12

vamsiampolu


1 Answers

This error is due to blank-space characters at the end of the line.

like image 74
Avraham Avatar answered Dec 11 '22 08:12

Avraham