You are here: PSPad forum > English discussion forum > Re: Javascript no support syntax highlighting for template literals

Re: Javascript no support syntax highlighting for template literals

#1 Javascript no support syntax highlighting for template literals

Posted by: RANZI | Date: 2020-07-29 14:28 | IP: IP Logged

Since Emacs2015, a new syntax appears for string syntax called "templace literals", cf. developer.mozilla.org

Can you support this to a future version of PSPad ?

Thank you

Options: Reply | Quote | Up ^


#2 Re: Javascript no support syntax highlighting for template literals

Posted by: pspad | Date: 2020-07-29 15:58 | IP: IP Logged

Yes, I can add support for it

Options: Reply | Quote | Up ^


#3 Re: Javascript no support syntax highlighting for template literals

Posted by: RANZI | Date: 2020-07-30 08:46 | IP: IP Logged

Excellent winking smiley
Thank's

Options: Reply | Quote | Up ^


#4 Re: Javascript no support syntax highlighting for template literals

Posted by: pspad | Date: 2020-08-04 20:07 | IP: IP Logged

Literals including template support are ready. The only thing I am not able to do is nested literals in templates, something like:

const classes = `header ${ isLargeScreen() ? '' :
`icon-${item.isCollapsed ? 'expander' : 'collapser'}` }`;

Suport for literals will be available in the next build

Options: Reply | Quote | Up ^


#5 Re: Javascript no support syntax highlighting for template literals

Posted by: RANZI | Date: 2020-08-12 10:29 | IP: IP Logged

Hi,

I test with PSPad 5.0.4(517)
The highlighting is not good for the last example with "In ES2015 with nested template literals" defined in developer.mozilla.org

image

Options: Reply | Quote | Up ^


#6 Re: Javascript no support syntax highlighting for template literals

Posted by: pspad | Date: 2020-08-12 11:21 | IP: IP Logged

I wrote that nested templates are not supported yet.
I am not sure gow much nested templates will be used, cause it makes code near unreadable.

Options: Reply | Quote | Up ^


#7 Re: Javascript no support syntax highlighting for template literals

Posted by: RANZI | Date: 2020-08-12 14:19 | IP: IP Logged

pspad:
I wrote that nested templates are not supported yet.
I am not sure gow much nested templates will be used, cause it makes code near unreadable.

No problem, I don't plan to use it either

Options: Reply | Quote | Up ^






Editor PSPad - freeware editor, © 2001 - 2024 Jan Fiala, Hosted by Webhosting TOJEONO.CZ, design by WebDesign PAY & SOFT, code Petr Dvořák, Privacy policy and GDPR