Skip to content

Pug template is not working with Pug official examples #107

Open
@keshon

Description

@keshon

I'm struggled with PUG template using official PUG example like this one:

- var user = {description: 'foo bar baz'}
- var authorised = false
#user
  if user.description
    h2.green Description
    p.description= user.description
  else if authorised
    h2.blue Description
    p.description.
      User has no description,
      why not add one...
  else
    h2.red Description
    p.description User has no description

I'm getting this error:

template:5: template:9: Error lex: lexClass: expect class name line: 9

Also comparison with == operator:

if .someVar== "someValue"
    div someVar has someValue

leads to:

template: index:131: unexpected "=" in operand

Metadata

Metadata

Assignees

No one assigned

    Labels

    ☢️ BugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions