File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed
src/PhpSpreadsheet/Style/NumberFormat/Wizard Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -55,7 +55,7 @@ protected function getLocaleFormat(): string
5555 $ formatter = new Locale ($ this ->fullLocale , NumberFormatter::CURRENCY_ACCOUNTING );
5656 $ mask = $ formatter ->format ();
5757 if ($ this ->decimals === 0 ) {
58- $ mask = (string ) preg_replace ('/\.0*/ ' , '' , $ mask );
58+ $ mask = (string ) preg_replace ('/\.0+/miu ' , '' , $ mask );
5959 }
6060
6161 return str_replace ('¤ ' , $ this ->formatCurrencyCode (), $ mask );
Original file line number Diff line number Diff line change @@ -72,7 +72,7 @@ protected function getLocaleFormat(): string
7272 $ formatter = new Locale ($ this ->fullLocale , NumberFormatter::CURRENCY );
7373 $ mask = $ formatter ->format ();
7474 if ($ this ->decimals === 0 ) {
75- $ mask = (string ) preg_replace ('/\.0*/ ' , '' , $ mask );
75+ $ mask = (string ) preg_replace ('/\.0+/miu ' , '' , $ mask );
7676 }
7777
7878 return str_replace ('¤ ' , $ this ->formatCurrencyCode (), $ mask );
You can’t perform that action at this time.
0 commit comments