【笔记】Highlight.js学习笔记

前言

Highlight.js is a syntax highlighter written in JavaScript. It works in the browser as well as on the server. It can work with pretty much any markup, doesn’t depend on any other frameworks, and has automatic language detection.(Github

下载依赖

1
npm install -D highlight.js

渲染代码高亮

1
import "highlight.js/styles/default.css";

完成