diff --git a/app/Services/PluginImportService.php b/app/Services/PluginImportService.php index 5cc928b..a9d93b3 100644 --- a/app/Services/PluginImportService.php +++ b/app/Services/PluginImportService.php @@ -68,12 +68,11 @@ class PluginImportService $fullLiquid = $sharedLiquid."\n".$fullLiquid; } - $fullLiquid = '
'."\n".$fullLiquid."\n".'
'; - // Check if the file ends with .liquid to set markup language $markupLanguage = 'blade'; if (pathinfo((string) $filePaths['fullLiquidPath'], PATHINFO_EXTENSION) === 'liquid') { $markupLanguage = 'liquid'; + $fullLiquid = '
'."\n".$fullLiquid."\n".'
'; } // Ensure custom_fields is properly formatted @@ -193,12 +192,11 @@ class PluginImportService $fullLiquid = $sharedLiquid."\n".$fullLiquid; } - $fullLiquid = '
'."\n".$fullLiquid."\n".'
'; - // Check if the file ends with .liquid to set markup language $markupLanguage = 'blade'; if (pathinfo((string) $filePaths['fullLiquidPath'], PATHINFO_EXTENSION) === 'liquid') { $markupLanguage = 'liquid'; + $fullLiquid = '
'."\n".$fullLiquid."\n".'
'; } // Ensure custom_fields is properly formatted diff --git a/tests/Feature/PluginImportTest.php b/tests/Feature/PluginImportTest.php index 5c4a31f..a0f3bc5 100644 --- a/tests/Feature/PluginImportTest.php +++ b/tests/Feature/PluginImportTest.php @@ -130,7 +130,9 @@ it('handles blade markup language correctly', function (): void { $pluginImportService = new PluginImportService(); $plugin = $pluginImportService->importFromZip($zipFile, $user); - expect($plugin->markup_language)->toBe('blade'); + expect($plugin->markup_language)->toBe('blade') + ->and($plugin->render_markup)->not->toContain('
') + ->and($plugin->render_markup)->toBe('
Blade template
'); }); it('imports plugin from monorepo with zip_entry_path parameter', function (): void {