Documentation
¶
Overview ¶
Package diff provides content diffing functionality for change detection.
This package is responsible for: - Generating unified diffs (text format) - Generating HTML diffs (side-by-side and inline) - Detecting meaningful changes (ignoring whitespace)
This file does NOT handle: - Content fetching (fetch package handles this) - Storage of diffs (store package handles this) - Webhook delivery (webhook package handles this)
Invariants: - All functions handle empty strings gracefully - HTML output is properly escaped - Unified diff format follows standard unified diff conventions
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateStyles ¶
func GenerateStyles() string
GenerateStyles returns CSS styles for HTML diffs.
func HasMeaningfulChanges ¶
HasMeaningfulChanges checks if content has meaningful changes (ignores whitespace-only changes).
func InlineDiff ¶
InlineDiff generates an inline HTML diff with highlights.
func UnifiedDiff ¶
UnifiedDiff generates a unified text diff between old and new content.