Skip to content
This repository has been archived by the owner on Feb 24, 2018. It is now read-only.

Errors when using #[] syntax #3

Closed
benedfit opened this issue Mar 4, 2015 · 1 comment
Closed

Errors when using #[] syntax #3

benedfit opened this issue Mar 4, 2015 · 1 comment

Comments

@benedfit
Copy link

benedfit commented Mar 4, 2015

Both

p #[a.rho(href='#', class='rho--modifier') with inline link]

and

p Some text #[a.rho(href='#', class='rho--modifier')]

throw:

Uncaught Error: Unexpected token `end-jade-interpolation` expected `text`, `code`, `:`, `newline` or `eos`

But

p Some text #[a.rho(href='#', class='rho--modifier') with inline link]

does not

ForbesLindesay pushed a commit to pugjs/pug-lexer that referenced this issue Apr 10, 2015
@benedfit
Copy link
Author

@ForbesLindesay thanks for the fix, but just noticed that I forgot to mention that line numbers and source files aren't reported for interpolated tags either. See:

{
    "type": "Tag",
    "name": "a",
    "selfClosing": false,
    "block": {
        "type": "Block",
        "nodes": []
    },
    "attrs": [{
        "name": "class",
        "val": "\'rho\'",
        "escaped": false
    }, {
        "name": "href",
        "val": "\'#\'",
        "escaped": true
    }, {
        "name": "class",
        "val": "\'rho--modifier\'",
        "escaped": true
    }],
    "attributeBlocks": [],
    "isInline": true,
    "line": 1
}

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

No branches or pull requests

1 participant