0.0.2 • Published 7 years ago
pl-detector v0.0.2
pl-detect
pl-detect detects a code snippet's programming lanuage.
It's modified from highlight.js.
Usage:
const detector = require('pl-detector');
console.log(detector.detect(`def hello(): print "hello"`).language);
Note
Since under the hood highlight.js uses a heuristic to detect languages, it won't be accurate in some cases.
LICENSE
BSD