0
Under review

JS syntax highlighting glitch for object spread

GreenGreens 1 day ago in iPad updated by Alexander Blach (Developer) 1 day ago 1

Syntax highlighting is not correct for this piece of code using object spread (…) :

const headers = {
'Content-Type': 'application/json',
...(token ? { 'Authorization': `Bearer ${token}` } : {})
};


It believes that there is a parenthesis mismatch

+1
Under review

Unfortunately the currently used JavaScript syntax definition doesn't seem to support the object spread operator.

I'll need to update the syntax highlighter to support more modern syntax definitions (Sublime Text 4) to fix that. This is planned for a future update.

For now, I can only ask you to ignore the error indicated in the code editor.