Skip to content

Commit 01a649b

Browse files
davericherpatrickbrouwers
authored andcommitted
Update to ExcelParser (SpartnerNL#1131)
The getSluggedIndex methods white-spaces a header if it contains a single percent sign. Percent is a common header in quite a few documents I have seen in the wild.
1 parent 061beca commit 01a649b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Maatwebsite/Excel/Parsers/ExcelParser.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ protected function getSluggedIndex($value, $ascii = false)
295295
$value = preg_replace('![' . preg_quote($flip) . ']+!u', $separator, $value);
296296

297297
// Remove all characters that are not the separator, letters, numbers, or whitespace.
298-
$value = preg_replace('![^' . preg_quote($separator) . '\pL\pN\s]+!u', '', mb_strtolower($value));
298+
$value = preg_replace('![^' . preg_quote($separator) . '\pL\pN\s]%+!u', '', mb_strtolower($value));
299299

300300
// Replace all separator characters and whitespace by a single separator
301301
$value = preg_replace('![' . preg_quote($separator) . '\s]+!u', $separator, $value);

0 commit comments

Comments
 (0)