@honkit/honkit-plugin-highlight 5.1.0 → 5.1.2

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.
Files changed (2) hide show
  1. package/index.js +8 -8
  2. package/package.json +2 -2
package/index.js CHANGED
@@ -5,7 +5,7 @@ const MAP = {
5
5
  js: "javascript",
6
6
  json: "javascript",
7
7
  rb: "ruby",
8
- csharp: "cs",
8
+ csharp: "cs"
9
9
  };
10
10
 
11
11
  function normalize(lang) {
@@ -26,7 +26,7 @@ function highlight(lang, code) {
26
26
  if (!lang)
27
27
  return {
28
28
  body: code,
29
- html: false,
29
+ html: false
30
30
  };
31
31
 
32
32
  // Normalize lang
@@ -34,7 +34,7 @@ function highlight(lang, code) {
34
34
 
35
35
  try {
36
36
  return hljs.highlight(code, {
37
- language: lang,
37
+ language: lang
38
38
  }).value;
39
39
  } catch (e) {
40
40
  console.error(e);
@@ -42,22 +42,22 @@ function highlight(lang, code) {
42
42
 
43
43
  return {
44
44
  body: code,
45
- html: false,
45
+ html: false
46
46
  };
47
47
  }
48
48
 
49
49
  module.exports = {
50
50
  book: {
51
51
  assets: "./css",
52
- css: ["website.css"],
52
+ css: ["website.css"]
53
53
  },
54
54
  ebook: {
55
55
  assets: "./css",
56
- css: ["ebook.css"],
56
+ css: ["ebook.css"]
57
57
  },
58
58
  blocks: {
59
59
  code: function (block) {
60
60
  return highlight(block.kwargs.language, block.body);
61
- },
62
- },
61
+ }
62
+ }
63
63
  };
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": "5.1.0",
4
+ "version": "5.1.2",
5
5
  "homepage": "https://github.com/honkit/honkit",
6
6
  "repository": {
7
7
  "type": "git",
@@ -34,5 +34,5 @@
34
34
  "publishConfig": {
35
35
  "access": "public"
36
36
  },
37
- "gitHead": "6acb1146ae4c21d64283f88f06f26427a35f349b"
37
+ "gitHead": "1a64ab031dec8d305f080a29bda1f4970c37ecff"
38
38
  }