@honkit/honkit-plugin-highlight 3.6.16 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/css/ebook.css +1 -1
- package/css/website.css +3 -3
- package/index.js +8 -1
- package/package.json +3 -3
- package/CHANGELOG.md +0 -24
package/css/ebook.css
CHANGED
package/css/website.css
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
.book .book-body .page-wrapper .page-inner section.normal pre,
|
|
2
2
|
.book .book-body .page-wrapper .page-inner section.normal code {
|
|
3
|
-
/* From highlight.js@10.
|
|
3
|
+
/* From highlight.js@10.7.3/styles/tomorrow.css */
|
|
4
4
|
/* http://jmblog.github.com/color-themes-for-google-code-highlightjs */
|
|
5
5
|
/* Tomorrow Comment */
|
|
6
6
|
/* Tomorrow Red */
|
|
@@ -96,7 +96,7 @@
|
|
|
96
96
|
}
|
|
97
97
|
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre,
|
|
98
98
|
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code {
|
|
99
|
-
/* From highlight.js@10.
|
|
99
|
+
/* From highlight.js@10.7.3/styles/solarized-light.css */
|
|
100
100
|
/*
|
|
101
101
|
|
|
102
102
|
Orginal Style from ethanschoonover.com/solarized (c) Jeremy Hull <sourdrums@gmail.com>
|
|
@@ -209,7 +209,7 @@ Orginal Style from ethanschoonover.com/solarized (c) Jeremy Hull <sourdrums@gmai
|
|
|
209
209
|
}
|
|
210
210
|
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre,
|
|
211
211
|
.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code {
|
|
212
|
-
/* From highlight.js@10.
|
|
212
|
+
/* From highlight.js@10.7.3/styles/tomorrow-night-bright.css */
|
|
213
213
|
/* Tomorrow Night Bright Theme */
|
|
214
214
|
/* Original theme - https://github.com/chriskempson/tomorrow-theme */
|
|
215
215
|
/* http://jmblog.github.com/color-themes-for-google-code-highlightjs */
|
package/index.js
CHANGED
|
@@ -17,6 +17,11 @@ function normalize(lang) {
|
|
|
17
17
|
return MAP[lower] || lower;
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
+
/**
|
|
21
|
+
* @param {string} lang
|
|
22
|
+
* @param {string} code
|
|
23
|
+
* @returns {string|{html: boolean, body}}
|
|
24
|
+
*/
|
|
20
25
|
function highlight(lang, code) {
|
|
21
26
|
if (!lang)
|
|
22
27
|
return {
|
|
@@ -28,7 +33,9 @@ function highlight(lang, code) {
|
|
|
28
33
|
lang = normalize(lang);
|
|
29
34
|
|
|
30
35
|
try {
|
|
31
|
-
return hljs.highlight(
|
|
36
|
+
return hljs.highlight(code, {
|
|
37
|
+
language: lang,
|
|
38
|
+
}).value;
|
|
32
39
|
} catch (e) {
|
|
33
40
|
console.error(e);
|
|
34
41
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@honkit/honkit-plugin-highlight",
|
|
3
3
|
"description": "Default code highlighter for HonKit",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "4.0.0",
|
|
5
5
|
"homepage": "https://github.com/honkit/honkit",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"css"
|
|
18
18
|
],
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"highlight.js": "^10.
|
|
20
|
+
"highlight.js": "^10.7.1"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
|
23
23
|
"less": "^3.12.2"
|
|
@@ -34,5 +34,5 @@
|
|
|
34
34
|
"publishConfig": {
|
|
35
35
|
"access": "public"
|
|
36
36
|
},
|
|
37
|
-
"gitHead": "
|
|
37
|
+
"gitHead": "32e906fc392accc23940e99e284efea005398544"
|
|
38
38
|
}
|
package/CHANGELOG.md
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
# Change Log
|
|
2
|
-
|
|
3
|
-
All notable changes to this project will be documented in this file.
|
|
4
|
-
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
|
-
|
|
6
|
-
## 3.6.16 (2020-12-15)
|
|
7
|
-
|
|
8
|
-
**Note:** Version bump only for package @honkit/honkit-plugin-highlight
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
## 3.6.15 (2020-12-05)
|
|
15
|
-
|
|
16
|
-
**Note:** Version bump only for package @honkit/honkit-plugin-highlight
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
## 3.6.14 (2020-11-29)
|
|
23
|
-
|
|
24
|
-
**Note:** Version bump only for package @honkit/honkit-plugin-highlight
|