@tsrx/prettier-plugin 0.5.0 → 0.5.2

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.
Files changed (2) hide show
  1. package/package.json +2 -2
  2. package/src/printer.js +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tsrx/prettier-plugin",
3
- "version": "0.5.0",
3
+ "version": "0.5.2",
4
4
  "description": "TSRX plugin for Prettier",
5
5
  "type": "module",
6
6
  "module": "src/index.js",
@@ -27,7 +27,7 @@
27
27
  "prettier-3-6": "npm:prettier@3.6.0"
28
28
  },
29
29
  "dependencies": {
30
- "@tsrx/core": "0.5.0"
30
+ "@tsrx/core": "0.5.2"
31
31
  },
32
32
  "files": [
33
33
  "src/"
package/src/printer.js CHANGED
@@ -1094,7 +1094,7 @@ function printRawTextAsWritten(path, options, print) {
1094
1094
  function huggedCodeBlock(node) {
1095
1095
  let index = -1;
1096
1096
  for (const [i, child] of node.children.entries()) {
1097
- if (child.type === 'JSXText' && /^\s*$/u.test(child.value) && child.value.includes('\n')) {
1097
+ if (child.type === 'JSXText' && /^\s*$/u.test(child.raw) && child.raw.includes('\n')) {
1098
1098
  continue;
1099
1099
  }
1100
1100
  if (index !== -1 || !child.tsrxCodeBlock || hasOwnComments(child)) return -1;