codesandbox / codesandbox-client

An online IDE for rapid web development
https://codesandbox.io
Other
13.13k stars 2.3k forks source link

CSB embed editor does not properly highlight `<script type="module">` #8259

Open markerikson opened 10 months ago

markerikson commented 10 months ago

🐛 bug report

Preflight Checklist

Description of the problem

I just updated a Redux docs vanilla JS example sandbox to go from a plain <script> tag to a <script type="module">. Now, the embed editor no longer does any syntax highlighting for the JS code in that script tag:

image

The code highlights correctly in the full CSB editor:

image

How has this issue affected you? What are you trying to accomplish?

This is a bare basic example of Redux usage with vanilla JS, to illustrate the concepts.

Lack of syntax highlighting isn't a total breaking issue, but it's definitely annoying and makes it harder for Redux learners to read the code in this example.

To Reproduce

Link to sandbox: https://codesandbox.io/s/redux-fundamentals-core-example-lr7k1?from-embed=&file=/index.html

JamesACS commented 10 months ago

Thank you for flagging this @markerikson - I've raised the issue with the team