@kobalab/liulian 1.1.14 → 1.1.15
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/ChangeLog.md +9 -0
- package/lib/text/liulian.js +2 -4
- package/lib/text/markdown.js +3 -5
- package/package.json +4 -4
package/ChangeLog.md
CHANGED
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
### v1.1.15 / 2026-03-19
|
|
2
|
+
|
|
3
|
+
- パッケージを最新化
|
|
4
|
+
- highlight.js 10.7.3 → 11.11.1
|
|
5
|
+
- シンタックスハイライトにおいて「不正な言語」を検出する方法を修正
|
|
6
|
+
- highlight.js の古い関数呼び出しの方法を現在の方法に修正
|
|
7
|
+
- markdown-it 12.3.2 → 14.1.1
|
|
8
|
+
- markdown-it-footnote 3.0.3 → 4.0.0
|
|
9
|
+
|
|
1
10
|
### v1.1.14 / 2026-03-14
|
|
2
11
|
|
|
3
12
|
- 編集画面の高さを調整
|
package/lib/text/liulian.js
CHANGED
|
@@ -319,15 +319,14 @@ class LiuLian {
|
|
|
319
319
|
blockPre() {
|
|
320
320
|
const lang = this.readline().match(/^>\|(.*)$/)[1];
|
|
321
321
|
const code = this.npBlock('|<').replace(/\n$/,'');
|
|
322
|
-
const error = console.error; console.error = ()=>{};
|
|
323
322
|
let html = '<pre>';
|
|
324
323
|
if (lang) {
|
|
325
|
-
|
|
324
|
+
if (hljs.getLanguage(lang)) {
|
|
326
325
|
html += '<code>'
|
|
327
326
|
+ hljs.highlight(code, { language: lang }).value
|
|
328
327
|
+ '</code>'
|
|
329
328
|
}
|
|
330
|
-
|
|
329
|
+
else {
|
|
331
330
|
html += '<code>'
|
|
332
331
|
+ hljs.highlightAuto(code).value
|
|
333
332
|
+ '</code>'
|
|
@@ -336,7 +335,6 @@ class LiuLian {
|
|
|
336
335
|
else {
|
|
337
336
|
html += cdata(code);
|
|
338
337
|
}
|
|
339
|
-
console.error = error;
|
|
340
338
|
return html + '</pre>\n\n';
|
|
341
339
|
}
|
|
342
340
|
|
package/lib/text/markdown.js
CHANGED
|
@@ -9,17 +9,15 @@ module.exports = require('markdown-it')({
|
|
|
9
9
|
html: true,
|
|
10
10
|
linkify: true,
|
|
11
11
|
highlight: function(str, lang) {
|
|
12
|
-
const error = console.error; console.error = ()=>{};
|
|
13
12
|
let html = '';
|
|
14
13
|
if (lang) {
|
|
15
|
-
|
|
16
|
-
html = hljs.highlight(
|
|
14
|
+
if (hljs.getLanguage(lang)) {
|
|
15
|
+
html = hljs.highlight(str, { language: lang }).value;
|
|
17
16
|
}
|
|
18
|
-
|
|
17
|
+
else {
|
|
19
18
|
html = hljs.highlightAuto(str).value;
|
|
20
19
|
}
|
|
21
20
|
}
|
|
22
|
-
console.error = error;
|
|
23
21
|
return html;
|
|
24
22
|
}
|
|
25
23
|
}).use(require('markdown-it-footnote'));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kobalab/liulian",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.15",
|
|
4
4
|
"description": "Node.jsで動作するWebサイト作成ツール",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -33,9 +33,9 @@
|
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"express": "^4.22.1",
|
|
35
35
|
"express-session": "^1.19.0",
|
|
36
|
-
"highlight.js": "^
|
|
37
|
-
"markdown-it": "^
|
|
38
|
-
"markdown-it-footnote": "^
|
|
36
|
+
"highlight.js": "^11.11.1",
|
|
37
|
+
"markdown-it": "^14.1.1",
|
|
38
|
+
"markdown-it-footnote": "^4.0.0",
|
|
39
39
|
"mime": "^2.6.0",
|
|
40
40
|
"multer": "^2.1.1",
|
|
41
41
|
"passport": "^0.7.0",
|