Skip to content

Issues parsing multiple tags on same line. #5

Description

@dmitrig01

Expected behavior:

            return (<g className={ color }><rect y={ y - 10 }  x="0" width="10" height="10" /><text y={ y } x="15">{ key }</text></g>);

Parses correctly.

Actual behavior:

Error: Line 82: Unexpected token <
[... return ( < g className = ...]
    at throwError (/Users/dmitrig01/Documents/Projects/branch/dashboard/node_modules/sweet.js/lib/parser.js:1887:21)
    at throwUnexpected (/Users/dmitrig01/Documents/Projects/branch/dashboard/node_modules/sweet.js/lib/parser.js:1939:9)

It works when I split it out to

            return (<g className={ color }>
                <rect y={ y - 10 }  x="0" width="10" height="10" />
                <text y={ y } x="15">{ key }</text>
            </g>);

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions