Skip to content
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

Merged
merged 7 commits into from
Nov 26, 2024
Merged

Conversation

tats-u
Copy link
Contributor

@tats-u tats-u commented Oct 28, 2024

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

image

Firefox treats them as a part of CJ.

https://codepen.io/tats-u/pen/wvVxrVj

image

A space would be inserted if they were not treated as non-CJ.

Checklist

  • I’ve added tests to confirm my change works.
  • (If changing the API or CLI) I’ve documented the changes I’ve made (in the docs/ directory).
  • (If the change is user-facing) I’ve added my changes to changelog_unreleased/*/XXXX.md file following changelog_unreleased/TEMPLATE.md.
  • I’ve read the contributing guidelines.

Try the playground for this PR

@tats-u tats-u changed the title Treat U+30A0 & U+30FB in Kataka Block as CJK Treat U+30A0 & U+30FB in Katakana Block as CJK Nov 4, 2024
@tats-u tats-u marked this pull request as ready for review November 4, 2024 09:35
unicodeRegex({
Block: ["Katakana"],
}),
),
Copy link
Member

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"],
  }),
);

Copy link
Contributor Author

@tats-u tats-u Nov 26, 2024

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

Copy link
Contributor Author

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

Copy link
Contributor Author

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 ]

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🫥

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🫥🤫😶🫤😬😑🫨😐🤥🫠

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello

Copy link

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 😂

@fisker fisker merged commit ac46a4f into prettier:main Nov 26, 2024
28 checks passed
@tats-u tats-u deleted the nakaten branch November 26, 2024 21:30
renovate bot added a commit to mmkal/eslint-plugin-mmkal that referenced this pull request Dec 4, 2024
##### [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>;
```
renovate bot added a commit to andrei-picus-tink/auto-renovate that referenced this pull request Dec 6, 2024
| 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>;
```
renovate bot added a commit to andrei-picus-tink/auto-renovate that referenced this pull request Dec 7, 2024
| 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>;
```
renovate bot added a commit to andrei-picus-tink/auto-renovate that referenced this pull request Dec 8, 2024
| 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>;
```
renovate bot added a commit to andrei-picus-tink/auto-renovate that referenced this pull request Dec 10, 2024
| 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>;
```
renovate bot added a commit to andrei-picus-tink/auto-renovate that referenced this pull request Dec 11, 2024
| 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>;
```
renovate bot added a commit to andrei-picus-tink/auto-renovate that referenced this pull request Dec 12, 2024
| 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>;
```
OCram85 pushed a commit to OCram85/arkanum that referenced this pull request Dec 12, 2024
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 ([#&#8203;16796](prettier/prettier#16796) by [@&#8203;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 ([#&#8203;16891](prettier/prettier#16891) by [@&#8203;fisker](https://github.com/fisker))

<!-- prettier-ignore -->

```jsx
// Input
class A {
  @&#8203;decorator
  /**
   * The method description
   *
  */
  async method(foo: Foo, bar: Bar) {
    console.log(foo);
  }
}

// Prettier 3.4.1
class A {
  @&#8203;decorator
  async /**
   * The method description
   *
   */
  method(foo: Foo, bar: Bar) {
    console.log(foo);
  }
}

// Prettier 3.4.2
class A {
  @&#8203;decorator
  /**
   * The method description
   *
   */
  async method(foo: Foo, bar: Bar) {
    console.log(foo);
  }
}
```

##### Fix non-idempotent formatting ([#&#8203;16899](prettier/prettier#16899) by [@&#8203;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>
renovate bot added a commit to andrei-picus-tink/auto-renovate that referenced this pull request Dec 14, 2024
| 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>;
```
renovate bot added a commit to andrei-picus-tink/auto-renovate that referenced this pull request Dec 15, 2024
| 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>;
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants