feat: Implement syntactic sugar and site-specific discovery config

- Add syntactic sugar for container transformation: .insertr containers → children get .insertr
- Fix discovery auto-running when disabled with site-specific config loading
- Add comprehensive styling test examples for HTML attribute preservation
- Include test input for syntactic sugar validation
- Update discovery defaults to respect developer intent (disabled by default)
This commit is contained in:
2025-09-19 15:57:28 +02:00
parent 2a0915dda0
commit 00c2ba34e6
9 changed files with 959 additions and 31 deletions

View File

@@ -0,0 +1,37 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Syntactic Sugar Test</title>
</head>
<body>
<h1>Syntactic Sugar Transformation Test</h1>
<!-- Test 1: Container with .insertr should be transformed -->
<section class="hero insertr">
<h1>Hero Title</h1>
<p>Hero description text</p>
<button>Call to Action</button>
</section>
<!-- Test 2: Individual element with .insertr should remain -->
<h2 class="insertr">Individual Header</h2>
<!-- Test 3: Container without .insertr should get expansion if viable -->
<div class="card">
<h3>Card Title</h3>
<p>Card description</p>
</div>
<!-- Test 4: Complex container with mixed content -->
<article class="blog-post insertr">
<header>
<h1>Blog Post Title</h1>
<time>2024-01-01</time>
</header>
<p>First paragraph of content</p>
<p>Second paragraph with <strong>formatting</strong></p>
</article>
</body>
</html>