4 ms·
Show HN: A JavaScript syntax highlighter in 40 lines of JavaScript
- explorigin 6y agoHandy for a one-off, but it uses regexps which are difficult to get right when you have nested strings (as can be done with template strings).
- atum47 6y agoI guess you're right. I had algorithms in mind when I wrote this code, not templates or JSX stuff.
- purplecats 6y agowhy does (current) number of lines of code matter