PrismJS / prism

Lightweight, robust, elegant syntax highlighting.
https://prismjs.com
MIT License
12.33k stars 1.29k forks source link

Auto detect code language plugin #3846

Open Ray-D-Song opened 23 hours ago

Ray-D-Song commented 23 hours ago

Recently I made a fork of guesslang-js, use tensorflow.js to detect code language in browser.
I made esm and Web Worker support for it.

After testing, I think it's a viable solution. Maybe it can be integrated like hljs auto highlight?

You can try it here:
https://ray-d-song.github.io/guesslang-js/

Repo: https://github.com/Ray-D-Song/guesslang-js