Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warning: missing space before text for line 7 of jade file #1591

Closed
mathieug opened this issue Jul 17, 2014 · 1 comment
Closed

Warning: missing space before text for line 7 of jade file #1591

mathieug opened this issue Jul 17, 2014 · 1 comment

Comments

@mathieug
Copy link

I get the warning when content is a HTML content.

doctype html
html
  head
  body
      #content
        block content
            !{ content }
@ForbesLindesay
Copy link
Member

Yes, that warning is correct because line 7 is !{ content }. The warning is because !{} and #{} are for interpolation within text. i.e. you have to be in text to start with. You should use = and != to buffer JavaScript expressions (see http://jade-lang.com/reference/code/):

doctype html
html
  head
  body
      #content
        block content
            != content
doctype html
html
  head
  body
      #content
        block content
            = content

Alternatively, put the interpolation inside plain-text.

doctype html
html
  head
  body
      #content
        block content
            | !{ content }
doctype html
html
  head
  body
      #content
        block content
            | #{ content }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants