diff --git a/src/ConfigFileFixer.php b/src/ConfigFileFixer.php index fa27a8f..69aa245 100644 --- a/src/ConfigFileFixer.php +++ b/src/ConfigFileFixer.php @@ -92,10 +92,10 @@ protected function fixForVersion1_0() 'shadows\:\s*' => 'boxShadow: ', 'svgFill\:\s*' => 'fill: ', 'svgStroke\:\s*' => 'stroke: ', - 'lists\:{regex_line}' => "listStylePosition:{regex_line}\nlistStyleType:{regex_line}", - 'position\:{regex_line}' => "position:{regex_line}\ninset:{regex_line}", - 'whitespace\:{regex_line}' => "whitespace:{regex_line}\nwordBreak:{regex_line}", - 'textStyle\:{regex_line}' => "fontStyle:{regex_line}\nfontSmoothing:{regex_line}". + 'lists\:{regex_line}' => "listStylePosition:{regex_line}\nlistStyleType:{regex_line}", + 'position\:{regex_line}' => "position:{regex_line}\ninset:{regex_line}", + 'whitespace\:{regex_line}' => "whitespace:{regex_line}\nwordBreak:{regex_line}", + 'textStyle\:{regex_line}' => "fontStyle:{regex_line}\nfontSmoothing:{regex_line}". "\ntextDecoration:{regex_line}\ntextTransform:{regex_line}", 'flexbox\:{regex_line}' => "flexDirection:{regex_line}\nflexWrap:{regex_line}". "\nalignItems:{regex_line}\nalignSelf:{regex_line}". @@ -158,7 +158,7 @@ protected function fixForVersion1_0() $this->searchAndReplace->perform('textColor:\s*colors', 'textColor: theme => theme(\'colors\')', SearchAndReplace::NO_ESCAPE); $this->searchAndReplace->perform('borderColor:\s*g([^\n]+)', "borderColor: theme => {\nreturn global.Object.assign({ default: theme('colors.gray.300', 'currentColor') }, theme('colors'))\n},", SearchAndReplace::NO_ESCAPE); $this->searchAndReplace->perform('require\(\'tailwindcss\/defaultConfig\'\)\(\)', "require('tailwindcss/defaultConfig')", SearchAndReplace::NO_ESCAPE); - - //TODO: use javascript beautifier package ... + + //TODO: use javascript beautifier package ... } } diff --git a/src/SearchAndReplace.php b/src/SearchAndReplace.php index 840698a..c718cd1 100644 --- a/src/SearchAndReplace.php +++ b/src/SearchAndReplace.php @@ -118,7 +118,7 @@ public function perform($search, $replace, $options = null) while (true) { if ( - strpos($search, 'regex_string') !== false + strpos($search, 'regex_string') !== false || strpos($search, 'regex_number') !== false || strpos($search, 'regex_line') !== false ) {