- Add sibling context detection to identify unique heading content - Include parent container context with enhanced class filtering - Look for heading siblings (h1-h6) that provide unique container context - Extract up to 12 chars of sibling heading text for differentiation Results: ✅ Collision Elimination: From 8 collisions to 0 collisions ✅ Unique Base IDs: Each element gets distinct ID (no -1, -2, -3 suffixes) ✅ Better Context: 'Example 1', 'Example 2' headings provide unique signatures ✅ Maintained Stability: Same elements still get same IDs across runs Before: index-p-cad2a8, index-p-cad2a8-1, index-p-cad2a8-2... (8 collisions) After: index-p-1198e8, index-p-215de9, index-p-604e11... (0 collisions)
14 KiB
14 KiB