advanced

command
v1.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 11, 2025 License: MIT Imports: 4 Imported by: 0

README

Advanced Element Processing

Demonstrates element processing capabilities in Defuddle Go.

Run Example

cd examples/advanced
go run main.go

What It Does

Shows how Defuddle processes different HTML elements:

  • ARIA Role Conversion - div[role="paragraph"]<p>
  • Code Block Processing - Preserves syntax highlighting
  • Math Formula Processing - Handles LaTeX formulas
  • Heading Standardization - Normalizes heading structure

Sample Output

=== Advanced Element Processing ===
Title: Advanced Processing Demo
Word Count: 18
Parse Time: 5 ms

=== Processed Content ===
<article>
    <h1>Advanced Element Processing</h1>
    <p>This div should become a paragraph.</p>
    <h2>Code Example</h2>
    <pre><code class="language-go">
func main() {
    fmt.Println("Hello, World!")
}
    </code></pre>
    <h2>ARIA Role List</h2>
    <ul>
        <li>Item 1</li>
        <li>Item 2</li>
    </ul>
    <p>Math formula: E = mc^2</p>
</article>

=== Processing Steps ===
1. role_processing: Converted 3 ARIA roles to semantic HTML
2. code_processing: Processed 1 code blocks
3. math_processing: Processed 1 mathematical formulas
4. heading_processing: Standardized 3 headings

Perfect for understanding advanced content processing features.

Documentation

Overview

Package main demonstrates advanced defuddle usage.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL