yuezk / vim-js

💯The most accurate syntax highlighting plugin for JavaScript and Flow.js
MIT License
140 stars 8 forks source link

Syntax coloration is wrong when there's "::" in a string #13

Closed julienw closed 3 years ago

julienw commented 3 years ago

This code gives a wrong color output for me:

          switch (marker.name) {
            case 'Navigation::Start':
              color = 'var(--grey-40)';
              break;
            case 'Load':
              color = 'var(--red-60)';
              break;
            case 'DOMContentLoaded':
              color = 'var(--blue-50)';
              break;
            default:
              if (marker.name.startsWith('Contentful paint ')) {
                color = 'var(--green-60)';
              }
          }

It starts to be wrong with the first case: Screenshot

yuezk commented 3 years ago

Thanks for your feedback, will take a look later.