@burger-editor/utils 4.0.0-alpha.63 → 4.0.0-alpha.65

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/package.json CHANGED
@@ -1,11 +1,13 @@
1
1
  {
2
2
  "name": "@burger-editor/utils",
3
- "version": "4.0.0-alpha.63",
3
+ "version": "4.0.0-alpha.65",
4
4
  "description": "BurgerEditor Editor Utility Functions",
5
5
  "author": "D-ZERO",
6
6
  "license": "(MIT OR Apache-2.0)",
7
7
  "repository": {
8
- "url": "https://github.com/d-zero-dev/BurgerEditor.git"
8
+ "type": "git",
9
+ "url": "https://github.com/d-zero-dev/BurgerEditor.git",
10
+ "directory": "packages/@burger-editor/utils"
9
11
  },
10
12
  "publishConfig": {
11
13
  "access": "public"
@@ -33,5 +35,5 @@
33
35
  "devDependencies": {
34
36
  "@types/turndown": "5.0.6"
35
37
  },
36
- "gitHead": "4ae044f9cff5133608170c22a3bf118d31feef89"
38
+ "gitHead": "442582aa1477914d9f546a521c4ae451fbc5d613"
37
39
  }
@@ -1,8 +0,0 @@
1
- /**
2
- * HTMLの先頭行のインデントを検出し、全行から同じインデントを削除する
3
- *
4
- * CRLF (\r\n) と LF (\n) の両方に対応
5
- * @param html - 正規化するHTML文字列
6
- * @returns インデントが正規化され、前後の空白行が削除されたHTML文字列
7
- */
8
- export declare function normalizeIndent(html: string): string;
@@ -1,18 +0,0 @@
1
- /**
2
- * HTMLの先頭行のインデントを検出し、全行から同じインデントを削除する
3
- *
4
- * CRLF (\r\n) と LF (\n) の両方に対応
5
- * @param html - 正規化するHTML文字列
6
- * @returns インデントが正規化され、前後の空白行が削除されたHTML文字列
7
- */
8
- export function normalizeIndent(html) {
9
- // 先頭の改行を削除
10
- const trimmedHtml = html.replace(/^(?:\r?\n)+/, '');
11
- const lines = trimmedHtml.split(/\r?\n/);
12
- const firstLineIndent = lines[0]?.match(/^\s+/)?.[0] ?? '';
13
- if (firstLineIndent.length === 0) {
14
- return trimmedHtml;
15
- }
16
- const normalizedLines = lines.map((line) => line.replace(firstLineIndent, ''));
17
- return normalizedLines.join('\n');
18
- }