Skip to content

Lexer thrown off by < character as attribute #93

Open

Description

@spider-mane

Sparser encounters parse error 1 more start types than end types. when supplying < as an html attribute such as:

<div data-direction="<">
    previous
</div>

in a larger example:

<div class="swiper-container">
  <div class="glide">
    <div class="glide__track" data-glide-el="track">
      <ul class="glide__slides">
        <li class="glide__slide"><img src="image1.png" alt="" /></li>
        <li class="glide__slide"><img src="image2.png" alt="" /></li>
        <li class="glide__slide"><img src="image3.png" alt="" /></li>
      </ul>

      <div data-glide-el="controls">
        <button class="" data-glide-dir="<">prev</button>
        <button data-glide-dir=">">next</button>
      </div>
    </div>
  </div>
</div>

I get 5 more start types than end types despite < as an attribute still only occurring once.

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions