0

I would like to add a grammar rule similar to the one found here. What that rule does is enable VSCode's JSON editor when it encounters an html file with

<script type="application/json">#Edit JSON</script>

What I would like is the same JSON editor support whenever it encounters a html attribute in this form:

<my-chart data='{"hello": "world"}'></my-chart>

In other words, any attribute that uses single quotes, inside of which it starts with a { and ends with a }, or starts with a [ and ends with a ].

Any suggestions what that should look like?

Bruce
  • 152
  • 3
  • 11

1 Answers1

0

I've basically found a way. WIP

Bruce
  • 152
  • 3
  • 11