zhangdocs 1.1.6 → 1.1.7

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/lib/toc.js +4 -0
  2. package/package.json +1 -1
package/lib/toc.js CHANGED
@@ -33,6 +33,10 @@ function toc(str,cb){
33
33
  } else {
34
34
  lang = '';
35
35
  }
36
+ // 如果 lang 只是 'hljs' 本身,当作没有语言处理
37
+ if(lang === 'hljs'){
38
+ lang = '';
39
+ }
36
40
  if(lang){
37
41
  try{
38
42
  htstr = hljs.highlight($(this).text(), { language: lang }).value;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zhangdocs",
3
- "version": "1.1.6",
3
+ "version": "1.1.7",
4
4
  "description": "Simple document generation tool. Dependence Node.js run.",
5
5
  "repository": {
6
6
  "type": "git",