-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Treat U+30A0 & U+30FB in Katakana Block as CJK #16796
Conversation
unicodeRegex({ | ||
Block: ["Katakana"], | ||
}), | ||
), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will this work?
const cjkCharset = new Charset(
getCjkCharset(),
unicodeRegex({
Script_Extensions: ["Han", "Katakana", "Hiragana", "Hangul", "Bopomofo"],
General_Category: [
"Other_Letter",
"Letter_Number",
"Other_Symbol",
"Modifier_Letter",
"Modifier_Symbol",
"Nonspacing_Mark",
],
// Firefox treats some symbols (U+30A0, U+30FB) in the Katakana block as CJK
Block: ["Katakana"],
}),
);
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No
node --experimental-require-module
Welcome to Node.js v22.11.0.
Type ".help" for more information.
> (node:33040) ExperimentalWarning: Support for loading ES Module in require() is an experimental feature and might change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
{ all: getCjkCharset } = require("cjk-regex")
[Module: null prototype] {
all: [Function: all],
letters: [Function: letters],
punctuations: [Function: punctuations]
}
> { Charset } = require("regexp-util")
[Module: null prototype] {
Base: [class Base],
Charset: [class Charset extends Base],
Or: [class Or extends Base],
charset: [Function: charset],
concat: [Function: concat],
optional: [Function: optional],
or: [Function: or],
repeat: [Function: repeat],
wrap: [Function: wrap]
}
> unicodeRegex = require("unicode-regex").default
[Function: unicode]
> const cjkCharset = new Charset(
... getCjkCharset(),
... unicodeRegex({
... Script_Extensions: ["Han", "Katakana", "Hiragana", "Hangul", "Bopomofo"],
... General_Category: [
... "Other_Letter",
... "Letter_Number",
... "Other_Symbol",
... "Modifier_Letter",
... "Modifier_Symbol",
... "Nonspacing_Mark",
... ],
... // Firefox treats some symbols (U+30A0, U+30FB) in the Katakana block as CJK
... Block: ["Katakana"],
... }),
... );
undefined
> cjkCharset.
cjkCharset.__proto__ cjkCharset.hasOwnProperty cjkCharset.isPrototypeOf cjkCharset.propertyIsEnumerable
cjkCharset.toLocaleString cjkCharset.valueOf
cjkCharset.isEmpty cjkCharset.toRegExp cjkCharset.toString
cjkCharset._isEmpty cjkCharset._toString cjkCharset._unique cjkCharset.constructor
cjkCharset.intersect cjkCharset.subtract cjkCharset.union
cjkCharset.data
> cjkCharset.
cjkCharset.__proto__ cjkCharset.hasOwnProperty cjkCharset.isPrototypeOf cjkCharset.propertyIsEnumerable
cjkCharset.toLocaleString cjkCharset.valueOf
cjkCharset.isEmpty cjkCharset.toRegExp cjkCharset.toString
cjkCharset._isEmpty cjkCharset._toString cjkCharset._unique cjkCharset.constructor
cjkCharset.intersect cjkCharset.subtract cjkCharset.union
cjkCharset.data
> cjkCharset.toRegExp("u")
/[\u{1100}-\u{11ff}\u{2e80}-\u{2e99}\u{2e9b}-\u{2ef3}\u{2f00}-\u{2fd5}\u{2ff0}-\u{303f}\u{3041}-\u{3096}\u{309d}-\u{309f}\u{30a1}-\u{30fa}\u{30fc}-\u{30ff}\u{3105}-\u{312f}\u{3131}-\u{318e}\u{3190}-\u{4dbf}\u{4e00}-\u{9fff}\u{a960}-\u{a97c}\u{ac00}-\u{d7a3}\u{d7b0}-\u{d7c6}\u{d7cb}-\u{d7fb}\u{f900}-\u{fa6d}\u{fa70}-\u{fad9}\u{fe10}-\u{fe1f}\u{fe30}-\u{fe6f}\u{ff00}-\u{ffef}\u{16fe3}\u{1aff0}-\u{1aff3}\u{1aff5}-\u{1affb}\u{1affd}-\u{1affe}\u{1b000}-\u{1b122}\u{1b132}\u{1b150}-\u{1b152}\u{1b155}\u{1b164}-\u{1b167}\u{1f200}\u{20000}-\u{2a6df}\u{2a700}-\u{2b739}\u{2b740}-\u{2b81d}\u{2b820}-\u{2cea1}\u{2ceb0}-\u{2ebe0}\u{2f800}-\u{2fa1d}\u{30000}-\u{3134a}\u{31350}-\u{323af}]/u
> cjkCharset.toRegExp("u").test("・")
false
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
c.f.
node --experimental-require-module
Welcome to Node.js v22.11.0.
Type ".help" for more information.
> (node:27776) ExperimentalWarning: Support for loading ES Module in require() is an experimental feature and might change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
{ all: getCjkCharset } = require("cjk-regex")
[Module: null prototype] {
all: [Function: all],
letters: [Function: letters],
punctuations: [Function: punctuations]
}
> { Charset } = require("regexp-util")
[Module: null prototype] {
Base: [class Base],
Charset: [class Charset extends Base],
Or: [class Or extends Base],
charset: [Function: charset],
concat: [Function: concat],
optional: [Function: optional],
or: [Function: or],
repeat: [Function: repeat],
wrap: [Function: wrap]
}
> unicodeRegex = require("unicode-regex").default
[Function: unicode]
> const cjkCharset = new Charset(
... getCjkCharset(),
... unicodeRegex({
... Script_Extensions: ["Han", "Katakana", "Hiragana", "Hangul", "Bopomofo"],
... General_Category: [
... "Other_Letter",
... "Letter_Number",
... "Other_Symbol",
... "Modifier_Letter",
... "Modifier_Symbol",
... "Nonspacing_Mark",
... ],
... }).union(
... // Firefox treats some symbols (U+30A0, U+30FB) in the Katakana block as CJK
... unicodeRegex({
... Block: ["Katakana"],
... }),
... ),
... );
undefined
> cjkCharset.toRegExp("u").test("・")
true
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
> c = unicodeRegex({
... Script_Extensions: ["Han", "Katakana", "Hiragana", "Hangul", "Bopomofo"],
... General_Category: [
... "Other_Letter",
... "Letter_Number",
... "Other_Symbol",
... "Modifier_Letter",
... "Modifier_Symbol",
... "Nonspacing_Mark",
... ],
... // Firefox treats some symbols (U+30A0, U+30FB) in the Katakana block as CJK
... Block: ["Katakana"],
... })
Charset { data: [ [ 12449, 12538 ], [ 12540, 12543 ] ] }
> ["あ","ア", "字","・"].map(s => c.toRegExp("u").test(s))
[ false, true, false, false ]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🫥
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🫥🤫😶🫤😬😑🫨😐🤥🫠
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't have a clue how you got the picture to this tweet lol 😂
##### [v3.4.2](https://github.com/prettier/prettier/blob/HEAD/CHANGELOG.md#342) [diff](prettier/prettier@3.4.1...3.4.2) ##### Treat U+30A0 & U+30FB in Katakana Block as CJK ([#16796](prettier/prettier#16796) by [@tats-u](https://github.com/tats-u)) Prettier doesn't treat U+30A0 & U+30FB as Japanese. U+30FB is commonly used in Japanese to represent the delimitation of first and last names of non-Japanese people or “and”. The following “C言語・C++・Go・Rust” means “C language & C++ & Go & Rust” in Japanese. <!-- prettier-ignore --> ```md <!-- Input (--prose-wrap=never) --> C言 語 ・ C++ ・ Go ・ Rust <!-- Prettier 3.4.1 --> C言語・ C++ ・ Go ・ Rust <!-- Prettier 3.4.2 --> C言語・C++・Go・Rust ``` U+30A0 can be used as the replacement of the `-` in non-Japanese names (e.g. “Saint-Saëns” (Charles Camille Saint-Saëns) can be represented as “サン゠サーンス” in Japanese), but substituted by ASCII hyphen (U+002D) or U+FF1D (full width hyphen) in many cases (e.g. “サン=サーンス” or “サン=サーンス”). ##### Fix comments print on class methods with decorators ([#16891](prettier/prettier#16891) by [@fisker](https://github.com/fisker)) <!-- prettier-ignore --> ```jsx // Input class A { @decorator /** * The method description * */ async method(foo: Foo, bar: Bar) { console.log(foo); } } // Prettier 3.4.1 class A { @decorator async /** * The method description * */ method(foo: Foo, bar: Bar) { console.log(foo); } } // Prettier 3.4.2 class A { @decorator /** * The method description * */ async method(foo: Foo, bar: Bar) { console.log(foo); } } ``` ##### Fix non-idempotent formatting ([#16899](prettier/prettier#16899) by [@seiyab](https://github.com/seiyab)) This bug fix is not language-specific. You may see similar change in any languages. This fixes regression in 3.4.0 so change caused by it should yield same formatting as 3.3.3. <!-- prettier-ignore --> ```jsx // Input <div> foo <span>longlonglonglonglonglonglonglonglonglonglonglonglonglonglongl foo</span> , abc </div>; // Prettier 3.4.1 (first) <div> foo <span> longlonglonglonglonglonglonglonglonglonglonglonglonglonglongl foo </span>, abc </div>; // Prettier 3.4.1 (second) <div> foo <span>longlonglonglonglonglonglonglonglonglonglonglonglonglonglongl foo</span> , abc </div>; // Prettier 3.4.2 <div> foo <span>longlonglonglonglonglonglonglonglonglonglonglonglonglonglongl foo</span> , abc </div>; ```
| datasource | package | from | to | | ---------- | -------- | ----- | ----- | | npm | prettier | 3.4.1 | 3.4.2 | ## [v3.4.2](https://github.com/prettier/prettier/blob/HEAD/CHANGELOG.md#342) [diff](prettier/prettier@3.4.1...3.4.2) ##### Treat U+30A0 & U+30FB in Katakana Block as CJK ([#16796](prettier/prettier#16796) by [@tats-u](https://github.com/tats-u)) Prettier doesn't treat U+30A0 & U+30FB as Japanese. U+30FB is commonly used in Japanese to represent the delimitation of first and last names of non-Japanese people or “and”. The following “C言語・C++・Go・Rust” means “C language & C++ & Go & Rust” in Japanese. <!-- prettier-ignore --> ```md <!-- Input (--prose-wrap=never) --> C言 語 ・ C++ ・ Go ・ Rust <!-- Prettier 3.4.1 --> C言語・ C++ ・ Go ・ Rust <!-- Prettier 3.4.2 --> C言語・C++・Go・Rust ``` U+30A0 can be used as the replacement of the `-` in non-Japanese names (e.g. “Saint-Saëns” (Charles Camille Saint-Saëns) can be represented as “サン゠サーンス” in Japanese), but substituted by ASCII hyphen (U+002D) or U+FF1D (full width hyphen) in many cases (e.g. “サン=サーンス” or “サン=サーンス”). ##### Fix comments print on class methods with decorators ([#16891](prettier/prettier#16891) by [@fisker](https://github.com/fisker)) <!-- prettier-ignore --> ```jsx // Input class A { @decorator /** * The method description * */ async method(foo: Foo, bar: Bar) { console.log(foo); } } // Prettier 3.4.1 class A { @decorator async /** * The method description * */ method(foo: Foo, bar: Bar) { console.log(foo); } } // Prettier 3.4.2 class A { @decorator /** * The method description * */ async method(foo: Foo, bar: Bar) { console.log(foo); } } ``` ##### Fix non-idempotent formatting ([#16899](prettier/prettier#16899) by [@seiyab](https://github.com/seiyab)) This bug fix is not language-specific. You may see similar change in any languages. This fixes regression in 3.4.0 so change caused by it should yield same formatting as 3.3.3. <!-- prettier-ignore --> ```jsx // Input <div> foo <span>longlonglonglonglonglonglonglonglonglonglonglonglonglonglongl foo</span> , abc </div>; // Prettier 3.4.1 (first) <div> foo <span> longlonglonglonglonglonglonglonglonglonglonglonglonglonglongl foo </span>, abc </div>; // Prettier 3.4.1 (second) <div> foo <span>longlonglonglonglonglonglonglonglonglonglonglonglonglonglongl foo</span> , abc </div>; // Prettier 3.4.2 <div> foo <span>longlonglonglonglonglonglonglonglonglonglonglonglonglonglongl foo</span> , abc </div>; ```
| datasource | package | from | to | | ---------- | -------- | ----- | ----- | | npm | prettier | 3.4.1 | 3.4.2 | ## [v3.4.2](https://github.com/prettier/prettier/blob/HEAD/CHANGELOG.md#342) [diff](prettier/prettier@3.4.1...3.4.2) ##### Treat U+30A0 & U+30FB in Katakana Block as CJK ([#16796](prettier/prettier#16796) by [@tats-u](https://github.com/tats-u)) Prettier doesn't treat U+30A0 & U+30FB as Japanese. U+30FB is commonly used in Japanese to represent the delimitation of first and last names of non-Japanese people or “and”. The following “C言語・C++・Go・Rust” means “C language & C++ & Go & Rust” in Japanese. <!-- prettier-ignore --> ```md <!-- Input (--prose-wrap=never) --> C言 語 ・ C++ ・ Go ・ Rust <!-- Prettier 3.4.1 --> C言語・ C++ ・ Go ・ Rust <!-- Prettier 3.4.2 --> C言語・C++・Go・Rust ``` U+30A0 can be used as the replacement of the `-` in non-Japanese names (e.g. “Saint-Saëns” (Charles Camille Saint-Saëns) can be represented as “サン゠サーンス” in Japanese), but substituted by ASCII hyphen (U+002D) or U+FF1D (full width hyphen) in many cases (e.g. “サン=サーンス” or “サン=サーンス”). ##### Fix comments print on class methods with decorators ([#16891](prettier/prettier#16891) by [@fisker](https://github.com/fisker)) <!-- prettier-ignore --> ```jsx // Input class A { @decorator /** * The method description * */ async method(foo: Foo, bar: Bar) { console.log(foo); } } // Prettier 3.4.1 class A { @decorator async /** * The method description * */ method(foo: Foo, bar: Bar) { console.log(foo); } } // Prettier 3.4.2 class A { @decorator /** * The method description * */ async method(foo: Foo, bar: Bar) { console.log(foo); } } ``` ##### Fix non-idempotent formatting ([#16899](prettier/prettier#16899) by [@seiyab](https://github.com/seiyab)) This bug fix is not language-specific. You may see similar change in any languages. This fixes regression in 3.4.0 so change caused by it should yield same formatting as 3.3.3. <!-- prettier-ignore --> ```jsx // Input <div> foo <span>longlonglonglonglonglonglonglonglonglonglonglonglonglonglongl foo</span> , abc </div>; // Prettier 3.4.1 (first) <div> foo <span> longlonglonglonglonglonglonglonglonglonglonglonglonglonglongl foo </span>, abc </div>; // Prettier 3.4.1 (second) <div> foo <span>longlonglonglonglonglonglonglonglonglonglonglonglonglonglongl foo</span> , abc </div>; // Prettier 3.4.2 <div> foo <span>longlonglonglonglonglonglonglonglonglonglonglonglonglonglongl foo</span> , abc </div>; ```
| datasource | package | from | to | | ---------- | -------- | ----- | ----- | | npm | prettier | 3.4.1 | 3.4.2 | ## [v3.4.2](https://github.com/prettier/prettier/blob/HEAD/CHANGELOG.md#342) [diff](prettier/prettier@3.4.1...3.4.2) ##### Treat U+30A0 & U+30FB in Katakana Block as CJK ([#16796](prettier/prettier#16796) by [@tats-u](https://github.com/tats-u)) Prettier doesn't treat U+30A0 & U+30FB as Japanese. U+30FB is commonly used in Japanese to represent the delimitation of first and last names of non-Japanese people or “and”. The following “C言語・C++・Go・Rust” means “C language & C++ & Go & Rust” in Japanese. <!-- prettier-ignore --> ```md <!-- Input (--prose-wrap=never) --> C言 語 ・ C++ ・ Go ・ Rust <!-- Prettier 3.4.1 --> C言語・ C++ ・ Go ・ Rust <!-- Prettier 3.4.2 --> C言語・C++・Go・Rust ``` U+30A0 can be used as the replacement of the `-` in non-Japanese names (e.g. “Saint-Saëns” (Charles Camille Saint-Saëns) can be represented as “サン゠サーンス” in Japanese), but substituted by ASCII hyphen (U+002D) or U+FF1D (full width hyphen) in many cases (e.g. “サン=サーンス” or “サン=サーンス”). ##### Fix comments print on class methods with decorators ([#16891](prettier/prettier#16891) by [@fisker](https://github.com/fisker)) <!-- prettier-ignore --> ```jsx // Input class A { @decorator /** * The method description * */ async method(foo: Foo, bar: Bar) { console.log(foo); } } // Prettier 3.4.1 class A { @decorator async /** * The method description * */ method(foo: Foo, bar: Bar) { console.log(foo); } } // Prettier 3.4.2 class A { @decorator /** * The method description * */ async method(foo: Foo, bar: Bar) { console.log(foo); } } ``` ##### Fix non-idempotent formatting ([#16899](prettier/prettier#16899) by [@seiyab](https://github.com/seiyab)) This bug fix is not language-specific. You may see similar change in any languages. This fixes regression in 3.4.0 so change caused by it should yield same formatting as 3.3.3. <!-- prettier-ignore --> ```jsx // Input <div> foo <span>longlonglonglonglonglonglonglonglonglonglonglonglonglonglongl foo</span> , abc </div>; // Prettier 3.4.1 (first) <div> foo <span> longlonglonglonglonglonglonglonglonglonglonglonglonglonglongl foo </span>, abc </div>; // Prettier 3.4.1 (second) <div> foo <span>longlonglonglonglonglonglonglonglonglonglonglonglonglonglongl foo</span> , abc </div>; // Prettier 3.4.2 <div> foo <span>longlonglonglonglonglonglonglonglonglonglonglonglonglonglongl foo</span> , abc </div>; ```
| datasource | package | from | to | | ---------- | -------- | ----- | ----- | | npm | prettier | 3.4.1 | 3.4.2 | ## [v3.4.2](https://github.com/prettier/prettier/blob/HEAD/CHANGELOG.md#342) [diff](prettier/prettier@3.4.1...3.4.2) ##### Treat U+30A0 & U+30FB in Katakana Block as CJK ([#16796](prettier/prettier#16796) by [@tats-u](https://github.com/tats-u)) Prettier doesn't treat U+30A0 & U+30FB as Japanese. U+30FB is commonly used in Japanese to represent the delimitation of first and last names of non-Japanese people or “and”. The following “C言語・C++・Go・Rust” means “C language & C++ & Go & Rust” in Japanese. <!-- prettier-ignore --> ```md <!-- Input (--prose-wrap=never) --> C言 語 ・ C++ ・ Go ・ Rust <!-- Prettier 3.4.1 --> C言語・ C++ ・ Go ・ Rust <!-- Prettier 3.4.2 --> C言語・C++・Go・Rust ``` U+30A0 can be used as the replacement of the `-` in non-Japanese names (e.g. “Saint-Saëns” (Charles Camille Saint-Saëns) can be represented as “サン゠サーンス” in Japanese), but substituted by ASCII hyphen (U+002D) or U+FF1D (full width hyphen) in many cases (e.g. “サン=サーンス” or “サン=サーンス”). ##### Fix comments print on class methods with decorators ([#16891](prettier/prettier#16891) by [@fisker](https://github.com/fisker)) <!-- prettier-ignore --> ```jsx // Input class A { @decorator /** * The method description * */ async method(foo: Foo, bar: Bar) { console.log(foo); } } // Prettier 3.4.1 class A { @decorator async /** * The method description * */ method(foo: Foo, bar: Bar) { console.log(foo); } } // Prettier 3.4.2 class A { @decorator /** * The method description * */ async method(foo: Foo, bar: Bar) { console.log(foo); } } ``` ##### Fix non-idempotent formatting ([#16899](prettier/prettier#16899) by [@seiyab](https://github.com/seiyab)) This bug fix is not language-specific. You may see similar change in any languages. This fixes regression in 3.4.0 so change caused by it should yield same formatting as 3.3.3. <!-- prettier-ignore --> ```jsx // Input <div> foo <span>longlonglonglonglonglonglonglonglonglonglonglonglonglonglongl foo</span> , abc </div>; // Prettier 3.4.1 (first) <div> foo <span> longlonglonglonglonglonglonglonglonglonglonglonglonglonglongl foo </span>, abc </div>; // Prettier 3.4.1 (second) <div> foo <span>longlonglonglonglonglonglonglonglonglonglonglonglonglonglongl foo</span> , abc </div>; // Prettier 3.4.2 <div> foo <span>longlonglonglonglonglonglonglonglonglonglonglonglonglonglongl foo</span> , abc </div>; ```
| datasource | package | from | to | | ---------- | -------- | ----- | ----- | | npm | prettier | 3.4.1 | 3.4.2 | ## [v3.4.2](https://github.com/prettier/prettier/blob/HEAD/CHANGELOG.md#342) [diff](prettier/prettier@3.4.1...3.4.2) ##### Treat U+30A0 & U+30FB in Katakana Block as CJK ([#16796](prettier/prettier#16796) by [@tats-u](https://github.com/tats-u)) Prettier doesn't treat U+30A0 & U+30FB as Japanese. U+30FB is commonly used in Japanese to represent the delimitation of first and last names of non-Japanese people or “and”. The following “C言語・C++・Go・Rust” means “C language & C++ & Go & Rust” in Japanese. <!-- prettier-ignore --> ```md <!-- Input (--prose-wrap=never) --> C言 語 ・ C++ ・ Go ・ Rust <!-- Prettier 3.4.1 --> C言語・ C++ ・ Go ・ Rust <!-- Prettier 3.4.2 --> C言語・C++・Go・Rust ``` U+30A0 can be used as the replacement of the `-` in non-Japanese names (e.g. “Saint-Saëns” (Charles Camille Saint-Saëns) can be represented as “サン゠サーンス” in Japanese), but substituted by ASCII hyphen (U+002D) or U+FF1D (full width hyphen) in many cases (e.g. “サン=サーンス” or “サン=サーンス”). ##### Fix comments print on class methods with decorators ([#16891](prettier/prettier#16891) by [@fisker](https://github.com/fisker)) <!-- prettier-ignore --> ```jsx // Input class A { @decorator /** * The method description * */ async method(foo: Foo, bar: Bar) { console.log(foo); } } // Prettier 3.4.1 class A { @decorator async /** * The method description * */ method(foo: Foo, bar: Bar) { console.log(foo); } } // Prettier 3.4.2 class A { @decorator /** * The method description * */ async method(foo: Foo, bar: Bar) { console.log(foo); } } ``` ##### Fix non-idempotent formatting ([#16899](prettier/prettier#16899) by [@seiyab](https://github.com/seiyab)) This bug fix is not language-specific. You may see similar change in any languages. This fixes regression in 3.4.0 so change caused by it should yield same formatting as 3.3.3. <!-- prettier-ignore --> ```jsx // Input <div> foo <span>longlonglonglonglonglonglonglonglonglonglonglonglonglonglongl foo</span> , abc </div>; // Prettier 3.4.1 (first) <div> foo <span> longlonglonglonglonglonglonglonglonglonglonglonglonglonglongl foo </span>, abc </div>; // Prettier 3.4.1 (second) <div> foo <span>longlonglonglonglonglonglonglonglonglonglonglonglonglonglongl foo</span> , abc </div>; // Prettier 3.4.2 <div> foo <span>longlonglonglonglonglonglonglonglonglonglonglonglonglonglongl foo</span> , abc </div>; ```
| datasource | package | from | to | | ---------- | -------- | ----- | ----- | | npm | prettier | 3.4.1 | 3.4.2 | ## [v3.4.2](https://github.com/prettier/prettier/blob/HEAD/CHANGELOG.md#342) [diff](prettier/prettier@3.4.1...3.4.2) ##### Treat U+30A0 & U+30FB in Katakana Block as CJK ([#16796](prettier/prettier#16796) by [@tats-u](https://github.com/tats-u)) Prettier doesn't treat U+30A0 & U+30FB as Japanese. U+30FB is commonly used in Japanese to represent the delimitation of first and last names of non-Japanese people or “and”. The following “C言語・C++・Go・Rust” means “C language & C++ & Go & Rust” in Japanese. <!-- prettier-ignore --> ```md <!-- Input (--prose-wrap=never) --> C言 語 ・ C++ ・ Go ・ Rust <!-- Prettier 3.4.1 --> C言語・ C++ ・ Go ・ Rust <!-- Prettier 3.4.2 --> C言語・C++・Go・Rust ``` U+30A0 can be used as the replacement of the `-` in non-Japanese names (e.g. “Saint-Saëns” (Charles Camille Saint-Saëns) can be represented as “サン゠サーンス” in Japanese), but substituted by ASCII hyphen (U+002D) or U+FF1D (full width hyphen) in many cases (e.g. “サン=サーンス” or “サン=サーンス”). ##### Fix comments print on class methods with decorators ([#16891](prettier/prettier#16891) by [@fisker](https://github.com/fisker)) <!-- prettier-ignore --> ```jsx // Input class A { @decorator /** * The method description * */ async method(foo: Foo, bar: Bar) { console.log(foo); } } // Prettier 3.4.1 class A { @decorator async /** * The method description * */ method(foo: Foo, bar: Bar) { console.log(foo); } } // Prettier 3.4.2 class A { @decorator /** * The method description * */ async method(foo: Foo, bar: Bar) { console.log(foo); } } ``` ##### Fix non-idempotent formatting ([#16899](prettier/prettier#16899) by [@seiyab](https://github.com/seiyab)) This bug fix is not language-specific. You may see similar change in any languages. This fixes regression in 3.4.0 so change caused by it should yield same formatting as 3.3.3. <!-- prettier-ignore --> ```jsx // Input <div> foo <span>longlonglonglonglonglonglonglonglonglonglonglonglonglonglongl foo</span> , abc </div>; // Prettier 3.4.1 (first) <div> foo <span> longlonglonglonglonglonglonglonglonglonglonglonglonglonglongl foo </span>, abc </div>; // Prettier 3.4.1 (second) <div> foo <span>longlonglonglonglonglonglonglonglonglonglonglonglonglonglongl foo</span> , abc </div>; // Prettier 3.4.2 <div> foo <span>longlonglonglonglonglonglonglonglonglonglonglonglonglonglongl foo</span> , abc </div>; ```
This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [prettier](https://prettier.io) ([source](https://github.com/prettier/prettier)) | devDependencies | patch | [`3.4.1` -> `3.4.2`](https://renovatebot.com/diffs/npm/prettier/3.4.1/3.4.2) | --- ### Release Notes <details> <summary>prettier/prettier (prettier)</summary> ### [`v3.4.2`](https://github.com/prettier/prettier/blob/HEAD/CHANGELOG.md#342) [Compare Source](prettier/prettier@3.4.1...3.4.2) [diff](prettier/prettier@3.4.1...3.4.2) ##### Treat U+30A0 & U+30FB in Katakana Block as CJK ([#​16796](prettier/prettier#16796) by [@​tats-u](https://github.com/tats-u)) Prettier doesn't treat U+30A0 & U+30FB as Japanese. U+30FB is commonly used in Japanese to represent the delimitation of first and last names of non-Japanese people or “and”. The following “C言語・C++・Go・Rust” means “C language & C++ & Go & Rust” in Japanese. <!-- prettier-ignore --> ```md <!-- Input (--prose-wrap=never) --> C言 語 ・ C++ ・ Go ・ Rust <!-- Prettier 3.4.1 --> C言語・ C++ ・ Go ・ Rust <!-- Prettier 3.4.2 --> C言語・C++・Go・Rust ``` U+30A0 can be used as the replacement of the `-` in non-Japanese names (e.g. “Saint-Saëns” (Charles Camille Saint-Saëns) can be represented as “サン゠サーンス” in Japanese), but substituted by ASCII hyphen (U+002D) or U+FF1D (full width hyphen) in many cases (e.g. “サン=サーンス” or “サン=サーンス”). ##### Fix comments print on class methods with decorators ([#​16891](prettier/prettier#16891) by [@​fisker](https://github.com/fisker)) <!-- prettier-ignore --> ```jsx // Input class A { @​decorator /** * The method description * */ async method(foo: Foo, bar: Bar) { console.log(foo); } } // Prettier 3.4.1 class A { @​decorator async /** * The method description * */ method(foo: Foo, bar: Bar) { console.log(foo); } } // Prettier 3.4.2 class A { @​decorator /** * The method description * */ async method(foo: Foo, bar: Bar) { console.log(foo); } } ``` ##### Fix non-idempotent formatting ([#​16899](prettier/prettier#16899) by [@​seiyab](https://github.com/seiyab)) This bug fix is not language-specific. You may see similar change in any languages. This fixes regression in 3.4.0 so change caused by it should yield same formatting as 3.3.3. <!-- prettier-ignore --> ```jsx // Input <div> foo <span>longlonglonglonglonglonglonglonglonglonglonglonglonglonglongl foo</span> , abc </div>; // Prettier 3.4.1 (first) <div> foo <span> longlonglonglonglonglonglonglonglonglonglonglonglonglonglongl foo </span>, abc </div>; // Prettier 3.4.1 (second) <div> foo <span>longlonglonglonglonglonglonglonglonglonglonglonglonglonglongl foo</span> , abc </div>; // Prettier 3.4.2 <div> foo <span>longlonglonglonglonglonglonglonglonglonglonglonglonglonglongl foo</span> , abc </div>; ``` </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS41Ny4xIiwidXBkYXRlZEluVmVyIjoiMzkuNTcuMSIsInRhcmdldEJyYW5jaCI6Im1hc3RlciIsImxhYmVscyI6WyJyZW5vdmF0ZSJdfQ==--> Reviewed-on: https://gitea.ocram85.com/arkanum/arkanum/pulls/151 Co-authored-by: renovate-bot <renovate@ocram85.com> Co-committed-by: renovate-bot <renovate@ocram85.com>
| datasource | package | from | to | | ---------- | -------- | ----- | ----- | | npm | prettier | 3.4.1 | 3.4.2 | ## [v3.4.2](https://github.com/prettier/prettier/blob/HEAD/CHANGELOG.md#342) [diff](prettier/prettier@3.4.1...3.4.2) ##### Treat U+30A0 & U+30FB in Katakana Block as CJK ([#16796](prettier/prettier#16796) by [@tats-u](https://github.com/tats-u)) Prettier doesn't treat U+30A0 & U+30FB as Japanese. U+30FB is commonly used in Japanese to represent the delimitation of first and last names of non-Japanese people or “and”. The following “C言語・C++・Go・Rust” means “C language & C++ & Go & Rust” in Japanese. <!-- prettier-ignore --> ```md <!-- Input (--prose-wrap=never) --> C言 語 ・ C++ ・ Go ・ Rust <!-- Prettier 3.4.1 --> C言語・ C++ ・ Go ・ Rust <!-- Prettier 3.4.2 --> C言語・C++・Go・Rust ``` U+30A0 can be used as the replacement of the `-` in non-Japanese names (e.g. “Saint-Saëns” (Charles Camille Saint-Saëns) can be represented as “サン゠サーンス” in Japanese), but substituted by ASCII hyphen (U+002D) or U+FF1D (full width hyphen) in many cases (e.g. “サン=サーンス” or “サン=サーンス”). ##### Fix comments print on class methods with decorators ([#16891](prettier/prettier#16891) by [@fisker](https://github.com/fisker)) <!-- prettier-ignore --> ```jsx // Input class A { @decorator /** * The method description * */ async method(foo: Foo, bar: Bar) { console.log(foo); } } // Prettier 3.4.1 class A { @decorator async /** * The method description * */ method(foo: Foo, bar: Bar) { console.log(foo); } } // Prettier 3.4.2 class A { @decorator /** * The method description * */ async method(foo: Foo, bar: Bar) { console.log(foo); } } ``` ##### Fix non-idempotent formatting ([#16899](prettier/prettier#16899) by [@seiyab](https://github.com/seiyab)) This bug fix is not language-specific. You may see similar change in any languages. This fixes regression in 3.4.0 so change caused by it should yield same formatting as 3.3.3. <!-- prettier-ignore --> ```jsx // Input <div> foo <span>longlonglonglonglonglonglonglonglonglonglonglonglonglonglongl foo</span> , abc </div>; // Prettier 3.4.1 (first) <div> foo <span> longlonglonglonglonglonglonglonglonglonglonglonglonglonglongl foo </span>, abc </div>; // Prettier 3.4.1 (second) <div> foo <span>longlonglonglonglonglonglonglonglonglonglonglonglonglonglongl foo</span> , abc </div>; // Prettier 3.4.2 <div> foo <span>longlonglonglonglonglonglonglonglonglonglonglonglonglonglongl foo</span> , abc </div>; ```
| datasource | package | from | to | | ---------- | -------- | ----- | ----- | | npm | prettier | 3.4.1 | 3.4.2 | ## [v3.4.2](https://github.com/prettier/prettier/blob/HEAD/CHANGELOG.md#342) [diff](prettier/prettier@3.4.1...3.4.2) ##### Treat U+30A0 & U+30FB in Katakana Block as CJK ([#16796](prettier/prettier#16796) by [@tats-u](https://github.com/tats-u)) Prettier doesn't treat U+30A0 & U+30FB as Japanese. U+30FB is commonly used in Japanese to represent the delimitation of first and last names of non-Japanese people or “and”. The following “C言語・C++・Go・Rust” means “C language & C++ & Go & Rust” in Japanese. <!-- prettier-ignore --> ```md <!-- Input (--prose-wrap=never) --> C言 語 ・ C++ ・ Go ・ Rust <!-- Prettier 3.4.1 --> C言語・ C++ ・ Go ・ Rust <!-- Prettier 3.4.2 --> C言語・C++・Go・Rust ``` U+30A0 can be used as the replacement of the `-` in non-Japanese names (e.g. “Saint-Saëns” (Charles Camille Saint-Saëns) can be represented as “サン゠サーンス” in Japanese), but substituted by ASCII hyphen (U+002D) or U+FF1D (full width hyphen) in many cases (e.g. “サン=サーンス” or “サン=サーンス”). ##### Fix comments print on class methods with decorators ([#16891](prettier/prettier#16891) by [@fisker](https://github.com/fisker)) <!-- prettier-ignore --> ```jsx // Input class A { @decorator /** * The method description * */ async method(foo: Foo, bar: Bar) { console.log(foo); } } // Prettier 3.4.1 class A { @decorator async /** * The method description * */ method(foo: Foo, bar: Bar) { console.log(foo); } } // Prettier 3.4.2 class A { @decorator /** * The method description * */ async method(foo: Foo, bar: Bar) { console.log(foo); } } ``` ##### Fix non-idempotent formatting ([#16899](prettier/prettier#16899) by [@seiyab](https://github.com/seiyab)) This bug fix is not language-specific. You may see similar change in any languages. This fixes regression in 3.4.0 so change caused by it should yield same formatting as 3.3.3. <!-- prettier-ignore --> ```jsx // Input <div> foo <span>longlonglonglonglonglonglonglonglonglonglonglonglonglonglongl foo</span> , abc </div>; // Prettier 3.4.1 (first) <div> foo <span> longlonglonglonglonglonglonglonglonglonglonglonglonglonglongl foo </span>, abc </div>; // Prettier 3.4.1 (second) <div> foo <span>longlonglonglonglonglonglonglonglonglonglonglonglonglonglongl foo</span> , abc </div>; // Prettier 3.4.2 <div> foo <span>longlonglonglonglonglonglonglonglonglonglonglonglonglonglongl foo</span> , abc </div>; ```
Description
From: #15081
Prettier doesn't treat U+30A0 & U+30FB as Japanese.
They're not included in
scx=Katakana
.ikatyang/cjk-regex#189
ikatyang/cjk-regex#190
https://prettier.io/playground/#N4Igxg9gdgLgprEAuEBDdACVHDaIYAW3AAXYB0p9jTCSyrKLzBvhhoJABoQIAHGAS2gGdkoVACdhEAO4AFEQgEpUAG3GoAngLYAjYajABrODADKqALZwAMtyhxkAM0V84m7XoOGOOqwHNkMYQFcnEEcTbl8AoLgADw44YW4zWEUAFTioEW44OXsFRzY+bwU4AEV-CHg7ByCAKz4ow0KSsoqkHLyQAEdmuEkxDjk0PgBaazgAE3HWED9UbgVvAGEIExNUZDQFBSmCqC8igEEYP24Nf3hJOMtrStyggAsYEwUAdTvueD4PMDhDWXfuABu7xU6zAfHUIABgQAklAJrBDGB4lx9nDDDAVEUbu0OGJHM9tBx1oplGoplZHMIYL1UF5Vtigh5hJT1qthLoxhIoFNhHAutxeTS6WtWlU2DBUBpntwxjA7sgAExsfyOZKS7JikBwEwacYTMbmVC7fy0uAAMQgwlWR28xLOECmuKsMGlsvlSAVAAYAL7eoA
Firefox treats them as a part of CJ.
https://codepen.io/tats-u/pen/wvVxrVj
A space would be inserted if they were not treated as non-CJ.
Checklist
docs/
directory).changelog_unreleased/*/XXXX.md
file followingchangelog_unreleased/TEMPLATE.md
.✨Try the playground for this PR✨