Show syntax errors on the playground (#12083)

## Summary

This PR updates the playground to show syntax errors.

(I forgot to update this and noticed it this morning.)

## Test Plan

Build the playground locally and preview it:

<img width="764" alt="Screenshot 2024-06-28 at 11 03 35"
src="1fd48d6c-ae41-4672-bf3c-32a61d9946ef">
This commit is contained in:
Dhruv Manilawala 2024-06-28 13:06:15 +05:30 committed by GitHub
parent 526efd398a
commit 9fec384d11
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 44 additions and 11 deletions

View file

@ -39,7 +39,7 @@ export default function SourceEditor({
startColumn: diagnostic.location.column,
endLineNumber: diagnostic.end_location.row,
endColumn: diagnostic.end_location.column,
message: `${diagnostic.code}: ${diagnostic.message}`,
message: diagnostic.code ? `${diagnostic.code}: ${diagnostic.message}` : diagnostic.message,
severity: MarkerSeverity.Error,
tags:
diagnostic.code === "F401" || diagnostic.code === "F841"