koztv-blog-tools 1.3.3 → 1.3.5
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/bin/export-telegram.js +1 -1
- package/dist/{chunk-OENFHIEQ.mjs → chunk-QSLKZOP4.mjs} +1 -1
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/dist/node.js +1 -1
- package/dist/node.mjs +1 -1
- package/package.json +1 -1
package/bin/export-telegram.js
CHANGED
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
* (original language is kept by default, use --skip-original to disable)
|
|
18
18
|
*/
|
|
19
19
|
|
|
20
|
-
const { exportAndTranslate } = require('../dist/
|
|
20
|
+
const { exportAndTranslate } = require('../dist/node.js');
|
|
21
21
|
const fs = require('fs');
|
|
22
22
|
const path = require('path');
|
|
23
23
|
|
|
@@ -43,7 +43,7 @@ function generateSlug(text, fallbackIdx) {
|
|
|
43
43
|
if (!cleaned || cleaned.length === 0) {
|
|
44
44
|
return `post-${fallbackIdx}`;
|
|
45
45
|
}
|
|
46
|
-
const slug = cleaned.toLowerCase().substring(0,
|
|
46
|
+
const slug = cleaned.toLowerCase().substring(0, 100).split("").map((char) => translitMap[char] || char).join("").replace(/[^a-z0-9\s-]/g, "").replace(/\s+/g, "-").replace(/-+/g, "-").replace(/^-|-$/g, "");
|
|
47
47
|
return slug || `post-${fallbackIdx}`;
|
|
48
48
|
}
|
|
49
49
|
function extractTitle(content, fallback = "\u0411\u0435\u0437 \u0437\u0430\u0433\u043E\u043B\u043E\u0432\u043A\u0430") {
|
package/dist/index.js
CHANGED
|
@@ -96,7 +96,7 @@ function generateSlug(text, fallbackIdx) {
|
|
|
96
96
|
if (!cleaned || cleaned.length === 0) {
|
|
97
97
|
return `post-${fallbackIdx}`;
|
|
98
98
|
}
|
|
99
|
-
const slug = cleaned.toLowerCase().substring(0,
|
|
99
|
+
const slug = cleaned.toLowerCase().substring(0, 100).split("").map((char) => translitMap[char] || char).join("").replace(/[^a-z0-9\s-]/g, "").replace(/\s+/g, "-").replace(/-+/g, "-").replace(/^-|-$/g, "");
|
|
100
100
|
return slug || `post-${fallbackIdx}`;
|
|
101
101
|
}
|
|
102
102
|
function extractTitle(content, fallback = "\u0411\u0435\u0437 \u0437\u0430\u0433\u043E\u043B\u043E\u0432\u043A\u0430") {
|
package/dist/index.mjs
CHANGED
package/dist/node.js
CHANGED
|
@@ -101,7 +101,7 @@ function generateSlug(text, fallbackIdx) {
|
|
|
101
101
|
if (!cleaned || cleaned.length === 0) {
|
|
102
102
|
return `post-${fallbackIdx}`;
|
|
103
103
|
}
|
|
104
|
-
const slug = cleaned.toLowerCase().substring(0,
|
|
104
|
+
const slug = cleaned.toLowerCase().substring(0, 100).split("").map((char) => translitMap[char] || char).join("").replace(/[^a-z0-9\s-]/g, "").replace(/\s+/g, "-").replace(/-+/g, "-").replace(/^-|-$/g, "");
|
|
105
105
|
return slug || `post-${fallbackIdx}`;
|
|
106
106
|
}
|
|
107
107
|
function extractTitle(content, fallback = "\u0411\u0435\u0437 \u0437\u0430\u0433\u043E\u043B\u043E\u0432\u043A\u0430") {
|
package/dist/node.mjs
CHANGED