taraskevizer 9.1.5 → 9.1.6
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/dist/bin.js +1 -1
- package/dist/config.d.ts +25 -8
- package/dist/config.js +2 -0
- package/dist/steps/finalize.js +9 -6
- package/package.json +5 -5
package/dist/bin.js
CHANGED
|
@@ -7,7 +7,7 @@ const printWithPrefix = (msg) => {
|
|
|
7
7
|
process.argv.splice(0, 2);
|
|
8
8
|
const checkForOptions = (options) => process.argv[0] && options.includes(process.argv[0].toLowerCase());
|
|
9
9
|
if (checkForOptions(['-v', '--version'])) {
|
|
10
|
-
printWithPrefix("9.1.
|
|
10
|
+
printWithPrefix("9.1.6");
|
|
11
11
|
process.exit(0);
|
|
12
12
|
}
|
|
13
13
|
if (checkForOptions(['-h', '--help'])) {
|
package/dist/config.d.ts
CHANGED
|
@@ -6,9 +6,7 @@ export type OptionJ = 'never' | 'random' | 'always';
|
|
|
6
6
|
export declare class TaraskConfig {
|
|
7
7
|
constructor(options?: PartialReadonly<TaraskConfig>);
|
|
8
8
|
/**
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
* The set of defined alphabets can be found in {@link dicts.alphabets}.
|
|
9
|
+
* Predefined alphabets are in {@link dicts.alphabets}.
|
|
12
10
|
*
|
|
13
11
|
* @default alphabets.cyrillic
|
|
14
12
|
*/
|
|
@@ -32,7 +30,14 @@ export declare class TaraskConfig {
|
|
|
32
30
|
* @default true
|
|
33
31
|
*/
|
|
34
32
|
doEscapeCapitalized: boolean;
|
|
35
|
-
/**
|
|
33
|
+
/**
|
|
34
|
+
* Used for wrapping changed parts.
|
|
35
|
+
* Predefined dicts are in {@link wrappers}.
|
|
36
|
+
*
|
|
37
|
+
* If `null`, wrapping changes will be skipped.
|
|
38
|
+
*
|
|
39
|
+
* @default null
|
|
40
|
+
*/
|
|
36
41
|
wrapperDict: null | WrapperDict;
|
|
37
42
|
/**
|
|
38
43
|
* Do replace ґ(g) by г(h) in cyrillic alphabet?
|
|
@@ -58,7 +63,19 @@ export declare class TaraskConfig {
|
|
|
58
63
|
* @default "all"
|
|
59
64
|
*/
|
|
60
65
|
variations: Variation;
|
|
66
|
+
/**
|
|
67
|
+
* String to replace `"\n"` with.
|
|
68
|
+
*
|
|
69
|
+
* @default "\n"
|
|
70
|
+
* @example "<br>"
|
|
71
|
+
*/
|
|
61
72
|
newLine: string;
|
|
73
|
+
/**
|
|
74
|
+
* String to replace `"<"` with.
|
|
75
|
+
*
|
|
76
|
+
* @default "<"
|
|
77
|
+
* @example "<"
|
|
78
|
+
*/
|
|
62
79
|
leftAngleBracket: string;
|
|
63
80
|
}
|
|
64
81
|
/**
|
|
@@ -71,8 +88,8 @@ export declare class TaraskConfig {
|
|
|
71
88
|
* });
|
|
72
89
|
*/
|
|
73
90
|
export declare const htmlConfigOptions: {
|
|
74
|
-
wrapperDict: Required<WrapperDict>;
|
|
75
|
-
g: false;
|
|
76
|
-
newLine:
|
|
77
|
-
leftAngleBracket:
|
|
91
|
+
readonly wrapperDict: Required<WrapperDict>;
|
|
92
|
+
readonly g: false;
|
|
93
|
+
readonly newLine: "<br>";
|
|
94
|
+
readonly leftAngleBracket: "<";
|
|
78
95
|
};
|
package/dist/config.js
CHANGED
package/dist/steps/finalize.js
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import { mutatingStep } from '../lib/index.js';
|
|
2
2
|
|
|
3
|
-
export const finalize = mutatingStep(({ text, cfg: { newLine } }) =>
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
3
|
+
export const finalize = mutatingStep(({ text, cfg: { newLine } }) => {
|
|
4
|
+
text = text
|
|
5
|
+
.replace(/(/g, '(')
|
|
6
|
+
.replace(/ /g, ' ')
|
|
7
|
+
.replace(/ (\p{P}|\p{S}|\d+) /gu, '$1');
|
|
8
|
+
if (newLine !== '\n')
|
|
9
|
+
text = text.replace(/\n/g, newLine);
|
|
10
|
+
return text.trim();
|
|
11
|
+
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "taraskevizer",
|
|
3
|
-
"version": "9.1.
|
|
3
|
+
"version": "9.1.6",
|
|
4
4
|
"author": "GooseOb",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -10,12 +10,12 @@
|
|
|
10
10
|
"module": "dist/index.js",
|
|
11
11
|
"devDependencies": {
|
|
12
12
|
"@digitak/esrun": "^3.2.26",
|
|
13
|
-
"@types/node": "^20.14.
|
|
14
|
-
"bun-types": "^1.1.
|
|
15
|
-
"husky": "^9.1.
|
|
13
|
+
"@types/node": "^20.14.14",
|
|
14
|
+
"bun-types": "^1.1.21",
|
|
15
|
+
"husky": "^9.1.4",
|
|
16
16
|
"prettier": "^3.3.3",
|
|
17
17
|
"typedoc": "^0.25.13",
|
|
18
|
-
"typescript": "^5.5.
|
|
18
|
+
"typescript": "^5.5.4"
|
|
19
19
|
},
|
|
20
20
|
"bin": {
|
|
21
21
|
"tarask": "dist/bin.js"
|