@mintlify/common 1.0.1163 → 1.0.1165

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.
@@ -90,11 +90,16 @@ const transformExpressionClassNames = (expr, tailwindSelectors) => {
90
90
  }
91
91
  };
92
92
  const transformClassNames = (value, tailwindSelectors) => {
93
+ var _a, _b, _c, _d;
93
94
  if (!tailwindSelectors || !tailwindSelectors.length)
94
95
  return value;
95
- return splitClassNames(value)
96
- .map((className) => transformClassName(className, tailwindSelectors))
97
- .join(' ');
96
+ const leadingSpace = (_b = (_a = value.match(/^\s+/)) === null || _a === void 0 ? void 0 : _a[0]) !== null && _b !== void 0 ? _b : '';
97
+ const trailingSpace = (_d = (_c = value.slice(leadingSpace.length).match(/\s+$/)) === null || _c === void 0 ? void 0 : _c[0]) !== null && _d !== void 0 ? _d : '';
98
+ return (leadingSpace +
99
+ splitClassNames(value)
100
+ .map((className) => transformClassName(className, tailwindSelectors))
101
+ .join(' ') +
102
+ trailingSpace);
98
103
  };
99
104
  const transformClassName = (className, tailwindSelectors) => {
100
105
  const classSegments = splitClassSegments(className);