web-mode icon indicating copy to clipboard operation
web-mode copied to clipboard

Customize JS open/close tags

Open gjm opened this issue 4 years ago • 0 comments

Hi.

Is it possible to customize the open/close tags for a Javascript region? I'm guessing web-mode interprets something inside a <script></script> block as Javascript but I would like to be able to extend this to other tags.

I'm using Laravel and have a Blade component that wraps around JS code with some extra sugar and I would like to be able to treat it like a regular JS block:

<x-script>
    alert('This is Javascript code!');
</x-script>

Is there some way I can do this?

Thanks!

gjm avatar May 08 '20 11:05 gjm