schleuse/dindent
Dindent is a regex-based HTML indenter/beautifier for development and testing. It formats template-generated markup with readable indentation without sanitizing, fixing, or rebuilding the document like DOM/Tidy—useful for debugging messy HTML output.
<style> tag support, one-line mode) reduce manual formatting overhead for complex templates (e.g., emails with embedded CSS or inline scripts). Multi-line comment handling and optimized speed further streamline debugging workflows.<pre|textarea> extraction enable precise HTML diffing for edge cases (e.g., minified snippets or code blocks), improving test reliability for dynamic content.<style> support align with initiatives to standardize HTML output in CI/CD for performance-critical templates (e.g., marketing emails).<pre>, <textarea>).For Executives:
*"This v3.0.0 update turns schleuse/dindent into a Swiss Army knife for HTML formatting—now handling <style> tags, one-line snippets, and code blocks while cutting test flakiness. For teams on PHP 8.2+, it’s a zero-cost upgrade that:
For Engineering: *"v3.0.0 adds critical features for Laravel/PHP teams:
<style> + inline element support: No more manual fixes for CSS-in-HTML.// Format with one-line mode for minified diffs
$minified = Dindent::format($html, mode: 'one-line');
// Handle <style> + preserve <pre> blocks
$formatted = Dindent::format($emailTemplate);
assertStringEqualsFile('expected.html', $formatted);
Alternatives (e.g., custom scripts) add maintenance overhead—this does one thing, perfectly, and now handles 90% of real-world HTML cases."*
How can I help you explore Laravel packages today?