mirror of
https://github.com/jlengrand/carbon.git
synced 2026-03-10 08:01:25 +00:00
Upgrade highlight.js (#996)
* upgrade highlight.js * add latex highlighter
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import React from 'react'
|
||||
import ReactDOM from 'react-dom'
|
||||
import dynamic from 'next/dynamic'
|
||||
import hljs from 'highlight.js/lib/highlight'
|
||||
import hljs from 'highlight.js/lib/core'
|
||||
import javascript from 'highlight.js/lib/languages/javascript'
|
||||
import debounce from 'lodash.debounce'
|
||||
import ms from 'ms'
|
||||
|
||||
@@ -652,14 +652,14 @@ export const LANGUAGES = [
|
||||
name: 'C++',
|
||||
mode: 'clike',
|
||||
mime: 'text/x-c++src',
|
||||
short: 'cpp',
|
||||
short: 'c-like',
|
||||
highlight: true,
|
||||
},
|
||||
{
|
||||
name: 'C#',
|
||||
mode: 'clike',
|
||||
mime: 'text/x-csharp',
|
||||
short: 'cs',
|
||||
short: 'csharp',
|
||||
highlight: true,
|
||||
},
|
||||
{
|
||||
@@ -808,10 +808,14 @@ export const LANGUAGES = [
|
||||
{
|
||||
name: 'LaTeX',
|
||||
mode: 'stex',
|
||||
short: 'latex',
|
||||
highlight: true,
|
||||
},
|
||||
{
|
||||
name: 'Lisp',
|
||||
mode: 'commonlisp',
|
||||
short: 'lisp',
|
||||
highlight: true,
|
||||
},
|
||||
{
|
||||
name: 'Lua',
|
||||
@@ -832,6 +836,8 @@ export const LANGUAGES = [
|
||||
name: 'MATLAB/Octave',
|
||||
mode: 'octave',
|
||||
mime: 'text/x-octave',
|
||||
short: 'matlab',
|
||||
hightlight: true,
|
||||
},
|
||||
{
|
||||
name: 'MySQL',
|
||||
@@ -865,6 +871,8 @@ export const LANGUAGES = [
|
||||
{
|
||||
name: 'OCaml/F#',
|
||||
mode: 'mllike',
|
||||
short: 'ocaml',
|
||||
highlight: true,
|
||||
},
|
||||
{
|
||||
name: 'Pascal',
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
"escape-goat": "^3.0.0",
|
||||
"firebase": "^7.14.2",
|
||||
"graphql": "^15.0.0",
|
||||
"highlight.js": "^9.18.1",
|
||||
"highlight.js": "^10.0.1",
|
||||
"kind-of": "^6.0.3",
|
||||
"lodash.debounce": "^4.0.8",
|
||||
"lodash.omitby": "^4.6.0",
|
||||
|
||||
10
yarn.lock
10
yarn.lock
@@ -6067,16 +6067,16 @@ hex-color-regex@^1.1.0:
|
||||
resolved "https://registry.yarnpkg.com/hex-color-regex/-/hex-color-regex-1.1.0.tgz#4c06fccb4602fe2602b3c93df82d7e7dbf1a8a8e"
|
||||
integrity sha512-l9sfDFsuqtOqKDsQdqrMRk0U85RZc0RtOR9yPI7mRVOa4FsR/BVnZ0shmQRM96Ji99kYZP/7hn1cedc1+ApsTQ==
|
||||
|
||||
highlight.js@^10.0.1:
|
||||
version "10.0.1"
|
||||
resolved "https://registry.yarnpkg.com/highlight.js/-/highlight.js-10.0.1.tgz#32ba25ee532291b86d1480b809a7e38bcd7f6dfe"
|
||||
integrity sha512-l1HB5S9nmBuvurFIOPbpeJv4psKh2MyKCTOYRK/E6dwRXkbG96PLH7amP/xpGNyZOK8OWqv45DxLS/ZAIb3n9w==
|
||||
|
||||
highlight.js@^9.12.0:
|
||||
version "9.15.8"
|
||||
resolved "https://registry.yarnpkg.com/highlight.js/-/highlight.js-9.15.8.tgz#f344fda123f36f1a65490e932cf90569e4999971"
|
||||
integrity sha512-RrapkKQWwE+wKdF73VsOa2RQdIoO3mxwJ4P8mhbI6KYJUraUHRKM5w5zQQKXNk0xNL4UVRdulV9SBJcmzJNzVA==
|
||||
|
||||
highlight.js@^9.18.1:
|
||||
version "9.18.1"
|
||||
resolved "https://registry.yarnpkg.com/highlight.js/-/highlight.js-9.18.1.tgz#ed21aa001fe6252bb10a3d76d47573c6539fe13c"
|
||||
integrity sha512-OrVKYz70LHsnCgmbXctv/bfuvntIKDz177h0Co37DQ5jamGZLVmoCVMtjMtNZY3X9DrCcKfklHPNeA0uPZhSJg==
|
||||
|
||||
hmac-drbg@^1.0.0:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/hmac-drbg/-/hmac-drbg-1.0.1.tgz#d2745701025a6c775a6c545793ed502fc0c649a1"
|
||||
|
||||
Reference in New Issue
Block a user