feat: CI/CD pipeline setup complete - Ansible playbooks updated, secrets configured, workflow ready
This commit is contained in:
25
tests/debug/test-whitespace-rendering.php
Normal file
25
tests/debug/test-whitespace-rendering.php
Normal file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
require __DIR__ . '/../../vendor/autoload.php';
|
||||
|
||||
use App\Framework\SyntaxHighlighter\FileHighlighter;
|
||||
|
||||
$highlighter = new FileHighlighter();
|
||||
$html = $highlighter('/var/www/html/src/Domain/Media/ImageSlotRepository.php', 12, 5, 14);
|
||||
|
||||
// Find line 14 in the output
|
||||
$lines = explode('<div class="line', $html);
|
||||
foreach ($lines as $line) {
|
||||
if (str_contains($line, 'Line 14')) {
|
||||
echo "Found line 14:\n";
|
||||
echo '<div class="line' . $line . "\n\n";
|
||||
|
||||
// Extract just the code part
|
||||
preg_match('/<span class="code">(.*?)<\/span>/s', $line, $matches);
|
||||
if (isset($matches[1])) {
|
||||
echo "Code content:\n";
|
||||
echo $matches[1] . "\n";
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user