Repository: platers/obsidian-linter (ts)

Issue:
Bug: Remove space header when option `RemoveSpaceAroundCharacters` is enabled and Katakata is beginning of the line
- [x] I have verified that I am on the latest version of the Linter

## Describe the Bug

Title.

## How to Reproduce

1. Enable `RemoveSpaceAroundCharacters` and `includeCJKSymbolsAndPunctuation` in the settings
2. Create a note with the following content:

```
## テスト
```

3. Lint the note, then the space between `##` and `テスト` will be removed.

## Expected Behavior

Don't remove the space between `##` and `テスト`.

## Device

- [ ] Desktop
- [x] Mobile


<!-- 新しいイシューの本文を編集し、エディターの右上にある ✓ [イシューの作成] ボタンをクリックします。最初の行がイシューのタイトルになります。担当者とラベルは空白行の後に続きます。イシューの本文を開始する前に空の行を残します。 -->

Pull request:
Fix CJK symbols and punctuation unicode
fix #1127

Reference:
https://en.wikipedia.org/wiki/CJK_Symbols_and_Punctuation

Patch:
diff --git a/src/rules/remove-space-around-characters.ts b/src/rules/remove-space-around-characters.ts
index 4e3ce3b..c032a17 100644
--- a/src/rules/remove-space-around-characters.ts
+++ b/src/rules/remove-space-around-characters.ts
@@ -33,7 +33,7 @@ export default class RemoveSpaceAroundCharacters extends RuleBuilder<RemoveSpace
     }
 
     if (options.includeCJKSymbolsAndPunctuation) {
-      symbolsRegExpBuilder += '\u3000-\u30ff';
+      symbolsRegExpBuilder += '\u3000-\u303f';
     }
 
     if (options.includeDashes) {


Test patch:
diff --git a/__tests__/remove-space-around-characters.test.ts b/__tests__/remove-space-around-characters.test.ts
index fc85621..15510dd 100644
--- a/__tests__/remove-space-around-characters.test.ts
+++ b/__tests__/remove-space-around-characters.test.ts
@@ -80,5 +80,17 @@ ruleTest({
         otherSymbols: ':;',
       },
     },
+    { // accounts for to https://github.com/platers/obsidian-linter/issues/1127
+      testName: 'Make sure that a header does not get spaces removed in some situations with CJK',
+      before: dedent`
+        ## テスト
+      `,
+      after: dedent`
+        ## テスト
+      `,
+      options: {
+        includeCJKSymbolsAndPunctuation: true,
+      },
+    },
   ],
 });