@jupyterlab/toc 5.3.1 → 5.3.4
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.
|
@@ -22,31 +22,33 @@ function getMarkdownHeadings(text, onClick, dict, lastLevel, cellRef, index = -1
|
|
|
22
22
|
console.warn('Deprecation warning! index argument will become mandatory in the next version');
|
|
23
23
|
}
|
|
24
24
|
for (const line of text.split('\n')) {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
25
|
+
if (line) {
|
|
26
|
+
const heading = parseHeading(line);
|
|
27
|
+
if (heading) {
|
|
28
|
+
headings.push({
|
|
29
|
+
text: heading.text,
|
|
30
|
+
level: heading.level,
|
|
31
|
+
numbering: generateNumbering(dict, heading.level),
|
|
32
|
+
onClick: callback,
|
|
33
|
+
type: 'header',
|
|
34
|
+
cellRef: cellRef,
|
|
35
|
+
hasChild: false,
|
|
36
|
+
isRunning,
|
|
37
|
+
index
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
else {
|
|
41
|
+
headings.push({
|
|
42
|
+
text: line,
|
|
43
|
+
level: lastLevel + 1,
|
|
44
|
+
onClick: callback,
|
|
45
|
+
type: 'markdown',
|
|
46
|
+
cellRef: cellRef,
|
|
47
|
+
hasChild: false,
|
|
48
|
+
isRunning,
|
|
49
|
+
index
|
|
50
|
+
});
|
|
51
|
+
}
|
|
50
52
|
}
|
|
51
53
|
}
|
|
52
54
|
return headings;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get_markdown_heading.js","sourceRoot":"","sources":["../../../src/generators/notebook/get_markdown_heading.ts"],"names":[],"mappings":"AAAA,0CAA0C;AAC1C,2DAA2D;AAG3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AACnE,OAAO,EAAoB,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACvE,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAWzD;;;;;;;;;;;GAWG;AACH,SAAS,mBAAmB,CAC1B,IAAY,EACZ,OAAuB,EACvB,IAAS,EACT,SAAiB,EACjB,OAAa,EACb,QAAgB,CAAC,CAAC,EAClB,SAAS,GAAG,aAAa,CAAC,IAAI;IAE9B,MAAM,QAAQ,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;IAC5B,IAAI,QAAQ,GAAuB,EAAE,CAAC;IACtC,IAAI,KAAK,KAAK,CAAC,CAAC,EAAE;QAChB,OAAO,CAAC,IAAI,CACV,+EAA+E,CAChF,CAAC;KACH;IACD,KAAK,MAAM,IAAI,IAAI,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE;QACnC,MAAM,OAAO,GAAG,YAAY,CAAC,IAAI,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"get_markdown_heading.js","sourceRoot":"","sources":["../../../src/generators/notebook/get_markdown_heading.ts"],"names":[],"mappings":"AAAA,0CAA0C;AAC1C,2DAA2D;AAG3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AACnE,OAAO,EAAoB,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACvE,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAWzD;;;;;;;;;;;GAWG;AACH,SAAS,mBAAmB,CAC1B,IAAY,EACZ,OAAuB,EACvB,IAAS,EACT,SAAiB,EACjB,OAAa,EACb,QAAgB,CAAC,CAAC,EAClB,SAAS,GAAG,aAAa,CAAC,IAAI;IAE9B,MAAM,QAAQ,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;IAC5B,IAAI,QAAQ,GAAuB,EAAE,CAAC;IACtC,IAAI,KAAK,KAAK,CAAC,CAAC,EAAE;QAChB,OAAO,CAAC,IAAI,CACV,+EAA+E,CAChF,CAAC;KACH;IACD,KAAK,MAAM,IAAI,IAAI,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE;QACnC,IAAI,IAAI,EAAE;YACR,MAAM,OAAO,GAAG,YAAY,CAAC,IAAI,CAAC,CAAC;YACnC,IAAI,OAAO,EAAE;gBACX,QAAQ,CAAC,IAAI,CAAC;oBACZ,IAAI,EAAE,OAAO,CAAC,IAAI;oBAClB,KAAK,EAAE,OAAO,CAAC,KAAK;oBACpB,SAAS,EAAE,iBAAiB,CAAC,IAAI,EAAE,OAAO,CAAC,KAAK,CAAC;oBACjD,OAAO,EAAE,QAAQ;oBACjB,IAAI,EAAE,QAAQ;oBACd,OAAO,EAAE,OAAO;oBAChB,QAAQ,EAAE,KAAK;oBACf,SAAS;oBACT,KAAK;iBACN,CAAC,CAAC;aACJ;iBAAM;gBACL,QAAQ,CAAC,IAAI,CAAC;oBACZ,IAAI,EAAE,IAAI;oBACV,KAAK,EAAE,SAAS,GAAG,CAAC;oBACpB,OAAO,EAAE,QAAQ;oBACjB,IAAI,EAAE,UAAU;oBAChB,OAAO,EAAE,OAAO;oBAChB,QAAQ,EAAE,KAAK;oBACf,SAAS;oBACT,KAAK;iBACN,CAAC,CAAC;aACJ;SACF;KACF;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC;AAED;;GAEG;AACH,OAAO,EAAE,mBAAmB,EAAE,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jupyterlab/toc",
|
|
3
|
-
"version": "5.3.
|
|
3
|
+
"version": "5.3.4",
|
|
4
4
|
"description": "JupyterLab - Table of Contents widget",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"jupyterlab"
|
|
@@ -40,18 +40,18 @@
|
|
|
40
40
|
"watch": "tsc -b --watch"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@jupyterlab/apputils": "^3.3.
|
|
44
|
-
"@jupyterlab/cells": "^3.3.
|
|
45
|
-
"@jupyterlab/coreutils": "^5.3.
|
|
46
|
-
"@jupyterlab/docmanager": "^3.3.
|
|
47
|
-
"@jupyterlab/docregistry": "^3.3.
|
|
48
|
-
"@jupyterlab/fileeditor": "^3.3.
|
|
49
|
-
"@jupyterlab/markdownviewer": "^3.3.
|
|
50
|
-
"@jupyterlab/notebook": "^3.3.
|
|
51
|
-
"@jupyterlab/rendermime": "^3.3.
|
|
52
|
-
"@jupyterlab/settingregistry": "^3.3.
|
|
53
|
-
"@jupyterlab/translation": "^3.3.
|
|
54
|
-
"@jupyterlab/ui-components": "^3.3.
|
|
43
|
+
"@jupyterlab/apputils": "^3.3.4",
|
|
44
|
+
"@jupyterlab/cells": "^3.3.4",
|
|
45
|
+
"@jupyterlab/coreutils": "^5.3.4",
|
|
46
|
+
"@jupyterlab/docmanager": "^3.3.4",
|
|
47
|
+
"@jupyterlab/docregistry": "^3.3.4",
|
|
48
|
+
"@jupyterlab/fileeditor": "^3.3.4",
|
|
49
|
+
"@jupyterlab/markdownviewer": "^3.3.4",
|
|
50
|
+
"@jupyterlab/notebook": "^3.3.4",
|
|
51
|
+
"@jupyterlab/rendermime": "^3.3.4",
|
|
52
|
+
"@jupyterlab/settingregistry": "^3.3.4",
|
|
53
|
+
"@jupyterlab/translation": "^3.3.4",
|
|
54
|
+
"@jupyterlab/ui-components": "^3.3.4",
|
|
55
55
|
"@lumino/coreutils": "^1.5.3",
|
|
56
56
|
"@lumino/domutils": "^1.2.3",
|
|
57
57
|
"@lumino/messaging": "^1.4.3",
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
"devDependencies": {
|
|
64
64
|
"@babel/core": "^7.10.2",
|
|
65
65
|
"@babel/preset-env": "^7.10.2",
|
|
66
|
-
"@jupyterlab/testutils": "^3.3.
|
|
66
|
+
"@jupyterlab/testutils": "^3.3.4",
|
|
67
67
|
"@types/jest": "^26.0.10",
|
|
68
68
|
"@types/react": "^17.0.0",
|
|
69
69
|
"@types/react-dom": "^17.0.0",
|