-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Language detection in the demo is stuck on "Delphi" #7
Comments
hmm looks like this is only a problem during production builds, running a local development build works just fine 🤔 |
By the way, just checked it happens in Chromium as well, so probably not browser specific. |
@joshgoebel I investigated this issue more, and it looks like auto-detection is crapping the bed. I haven't tried replicating this in a JSFiddle yet, but do you know what may be causing this? I can't image the Delphi grammar is this fucked with relevancy calculations. |
You said it worked in dev mode, are these relevance numbers actually different in dev mode? I'd remove |
Yes, these relevancy numbers are entirely different in development mode (actually sane compared to dev). My current theory is that Webpack is fucking something up in the bundling process, leading to these inconsistencies. But I agree, I am leaning towards removing the auto-detection for all 190 languages and just using |
Sounds like something in the build is indeed broken. Could you just use a static build instead, like from cdn-release? Or use a much better bundler, like rollup? |
Typing a single character into the code box on https://highlightjs.org/demo results in the output window saying "Delphi" and code not highlighted (even valid Delphi).
I'm using Firefox, didn't try in other browsers.
The text was updated successfully, but these errors were encountered: