$vPadding = 2;
$hPadding = 2;
$tooltip = '';
- $ignoreSeparators = '';
+
switch ($rules) {
case 'cart':
$type = \Fluidbook\Tools\Links\Link::CART;
$target = '';
+ break;
case 'steelite':
$toSuffix = '?embed';
$target = '_popupiframe';
- $ignoreSeparators = '-';
+ break;
case 'web':
default:
break;
$excel = ExcelToArray::excelToArrayKeyVal($uploadedFile->getPathname());
/** @var FluidbookPublication $fluidbook */
$fluidbook = FluidbookPublication::withoutGlobalScopes()->find($fluidbook_id);
+
+
+ uksort($excel, function ($a, $b) {
+ return mb_strlen($b) - mb_strlen($a);
+ });
+ $ignoreSeparators = [];
+ foreach ($excel as $search => $url) {
+ if (preg_match_all('/[^0-9A-Za-z]/', $search, $matches)) {
+ $ignoreSeparators += $matches[0];
+ }
+ }
+ $ignoreSeparators = implode('', array_unique($ignoreSeparators));
$highlights = $fluidbook->getHightlightData($ignoreSeparators);
foreach ($excel as $search => $url) {