最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - The end of the string was reached with no closing bracket found: NodeJS & Jade - Stack Overflow

programmeradmin1浏览0评论

I am beginning my journey down the path of node (following the rolling with mongo tutorial), and have written the following jade file

extends layout
block content
  h1= title
  form( method="post")
    div
      div
        span Title :
        input(type="text", name="title", id="editArticleTitle")
      div
        span Body :
        textarea(name="body", rows=20, id="editArticleBody)// <--- This line!
      div#editArticleSubmit
        input(type="submit", value="Send")

I get The end of the string was reached with no closing bracket found. ing out of the jade character parser. It blames the line that is pointed to in the above code. It's certainly possible that I'm missing a bracket, but I'm not seeing where it might be.

Here's the stack trace:

The end of the string was reached with no closing bracket found.
    at Function.parseMax (/home/me/Documents/node/blog/node_modules/jade/node_modules/character-parser/index.js:26:13)
    at Object.Lexer.bracketExpression (/home/me/Documents/node/blog/node_modules/jade/lib/lexer.js:138:33)
    at Object.Lexer.attrs (/home/me/Documents/node/blog/node_modules/jade/lib/lexer.js:524:24)
    at Object.Lexer.next (/home/me/Documents/node/blog/node_modules/jade/lib/lexer.js:788:15)
    at Object.Lexer.lookahead (/home/me/Documents/node/blog/node_modules/jade/lib/lexer.js:122:46)
    at Object.Parser.lookahead (/home/me/Documents/node/blog/node_modules/jade/lib/parser.js:116:23)
    at Object.Parser.parseTag (/home/me/Documents/node/blog/node_modules/jade/lib/parser.js:618:25)
    at Object.Parser.parseExpr (/home/me/Documents/node/blog/node_modules/jade/lib/parser.js:199:21)
    at Object.Parser.block (/home/me/Documents/node/blog/node_modules/jade/lib/parser.js:593:25)
    at Object.Parser.tag (/home/me/Documents/node/blog/node_modules/jade/lib/parser.js:722:26)

I am beginning my journey down the path of node (following the rolling with mongo tutorial), and have written the following jade file

extends layout
block content
  h1= title
  form( method="post")
    div
      div
        span Title :
        input(type="text", name="title", id="editArticleTitle")
      div
        span Body :
        textarea(name="body", rows=20, id="editArticleBody)// <--- This line!
      div#editArticleSubmit
        input(type="submit", value="Send")

I get The end of the string was reached with no closing bracket found. ing out of the jade character parser. It blames the line that is pointed to in the above code. It's certainly possible that I'm missing a bracket, but I'm not seeing where it might be.

Here's the stack trace:

The end of the string was reached with no closing bracket found.
    at Function.parseMax (/home/me/Documents/node/blog/node_modules/jade/node_modules/character-parser/index.js:26:13)
    at Object.Lexer.bracketExpression (/home/me/Documents/node/blog/node_modules/jade/lib/lexer.js:138:33)
    at Object.Lexer.attrs (/home/me/Documents/node/blog/node_modules/jade/lib/lexer.js:524:24)
    at Object.Lexer.next (/home/me/Documents/node/blog/node_modules/jade/lib/lexer.js:788:15)
    at Object.Lexer.lookahead (/home/me/Documents/node/blog/node_modules/jade/lib/lexer.js:122:46)
    at Object.Parser.lookahead (/home/me/Documents/node/blog/node_modules/jade/lib/parser.js:116:23)
    at Object.Parser.parseTag (/home/me/Documents/node/blog/node_modules/jade/lib/parser.js:618:25)
    at Object.Parser.parseExpr (/home/me/Documents/node/blog/node_modules/jade/lib/parser.js:199:21)
    at Object.Parser.block (/home/me/Documents/node/blog/node_modules/jade/lib/parser.js:593:25)
    at Object.Parser.tag (/home/me/Documents/node/blog/node_modules/jade/lib/parser.js:722:26)
Share Improve this question asked Sep 18, 2013 at 5:11 Peter KlipfelPeter Klipfel 5,1785 gold badges31 silver badges45 bronze badges 3
  • 3 textarea(name="body", rows=20, id="editArticleBody) You're missing a closing double quote on the id attribute. id="editArticleBody" – c.P.u1 Commented Sep 18, 2013 at 5:14
  • ARG! I need to get some syntax highlighting. – Peter Klipfel Commented Sep 18, 2013 at 15:29
  • What would be even cooler is if the error gave you a line number :-) – James M. Lay Commented Jan 10, 2015 at 20:44
Add a ment  | 

1 Answer 1

Reset to default 5

It was late. I was missing the closing quote

发布评论

评论列表(0)

  1. 暂无评论