Beaker: In HTML files: no javascript syntax highlighting for module scripts

Created on 20 May 2020  路  2Comments  路  Source: beakerbrowser/beaker

Describe the bug
In HTML files, syntax highlighting for javascript is gone when adding type="module" to the script tag.

To Reproduce
Steps to reproduce the behavior:

  1. Create a new html file in any hyperdrive.
  2. Add <script>if (true) {console.log('hi')}('hi')</script> somewhere in the file.
  3. You'll see there's syntax highlighting for the javascript.
  4. Add type="module". I.e., edit the code to be <script type="module">if (true) {console.log('hi')}</script>.
  5. Syntax highlighting for the javascript is gone.

Expected behavior
For the javascript syntax highlighting to work for module scripts.

Screenshots
Javascript syntax highlighting working in non-module scripts: (no problem here)
image

Javascript syntax highlighting not working in module scripts:
image

Desktop:

  • OS: Windows 10
  • Browser: Beaker Browser
  • Version: v1.0.0-prerelease.1

Additional context
None.

bug

Most helpful comment

It took some fancy maneuvering (aka literally anything with Monaco) but I got this one!

All 2 comments

May be fixable by updating our version of Monaco. I'll check into it.

It took some fancy maneuvering (aka literally anything with Monaco) but I got this one!

Was this page helpful?
0 / 5 - 0 ratings