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 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.5");
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
- * Any object that implements the {@link Alphabet} interface.
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
- /** @default null */
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 "&lt;"
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: string;
77
- leftAngleBracket: string;
91
+ readonly wrapperDict: Required<WrapperDict>;
92
+ readonly g: false;
93
+ readonly newLine: "<br>";
94
+ readonly leftAngleBracket: "&lt";
78
95
  };
package/dist/config.js CHANGED
@@ -20,7 +20,9 @@ export class TaraskConfig {
20
20
  g = true;
21
21
 
22
22
  variations = 'all';
23
+
23
24
  newLine = '\n';
25
+
24
26
  leftAngleBracket = '<';
25
27
  }
26
28
 
@@ -1,8 +1,11 @@
1
1
  import { mutatingStep } from '../lib/index.js';
2
2
 
3
- export const finalize = mutatingStep(({ text, cfg: { newLine } }) => text
4
- .replace(/&#40/g, '(')
5
- .replace(/&nbsp;/g, ' ')
6
- .replace(/ (\p{P}|\p{S}|\d+) /gu, '$1')
7
- .replace(/\n/g, newLine)
8
- .trim());
3
+ export const finalize = mutatingStep(({ text, cfg: { newLine } }) => {
4
+ text = text
5
+ .replace(/&#40/g, '(')
6
+ .replace(/&nbsp;/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.5",
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.11",
14
- "bun-types": "^1.1.20",
15
- "husky": "^9.1.0",
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.3"
18
+ "typescript": "^5.5.4"
19
19
  },
20
20
  "bin": {
21
21
  "tarask": "dist/bin.js"