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

Any custom component named style* breaks syntax highlighting #158

Open
TMMeijers opened this issue Jun 30, 2021 · 0 comments
Open

Any custom component named style* breaks syntax highlighting #158

TMMeijers opened this issue Jun 30, 2021 · 0 comments

Comments

@TMMeijers
Copy link

Hi maintainers,

First of all, many thanks for your plugin! I use it with pleasure, it works really well.

I have encounted one issue recently, and I'm afraid I'm not proficient in vim-script / plugins to look into it myself.

What happens is that any custom component starting it's name with style, breaks the syntax highlighting. Probably because it starts CSS highlighting after the component.

Take for example the following Vue file (let's assume the StyleIcon component is globally registered):

<html>
  <div>
    <style-icon class="some-class">{{ data }}</style-icon>
  </div>
</html>

<script>
export default {
  name: 'Test',

  computed: {
    data() {
      return 'test'
    },
  },
}
</script>

<style>
.some-class {
  font-size: 20px;
}
</style>

The resulting highlighting is as follows:
image

If I change the name of the component to something else, let's say StylIcon, syntax highlighting works as expected:
image

Hopefully this bug report is useful. Let me know if you need something else.

Have a nice day!
Thomas

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

1 participant