highlightjs / highlight.js

JavaScript syntax highlighter with language auto-detection and zero dependencies.
https://highlightjs.org/
BSD 3-Clause "New" or "Revised" License
23.52k stars 3.57k forks source link

Json language regex performance #3857

Closed MegatronKing closed 6 months ago

MegatronKing commented 1 year ago

Describe the issue/behavior that seems buggy

I translated highlightjs with dart language, everything works perfectly. But when a field in the JSON data is too long, dart will have a StackOverFlow error, seems that the dart VM uses a smaller stack size than Javascript. I have report this issue to Dart-SDK, their suggestion is optimizing the regex. Please see the conversation here: https://github.com/dart-lang/sdk/issues/48425#issuecomment-1592987082

joshgoebel commented 6 months ago

Closing this as this is obviously a Dart specific issue.