+1
Under review

JS syntax highlighting glitch for object spread

GreenGreens 2 months ago in iPad updated by Unique Username 3 weeks ago 2

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

+2
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.

This is great news. 

It seems that Textastic is currently using Sublime Text 3.1 (possibly 3.2) because `embed` (introduced in 3153) works but integer `pop` (4050) does not. 

Source - spent the last few months painstakingly “updating” most of the built-in syntaxes 😅