Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor HTML link extractor for improved performance and maintainabi…
…lity - Replace Vec<u8> with String for better readability and manipulation - Introduce Element struct to encapsulate element-related data - Use HashMap<String, String> for current_attributes for efficient lookups - Add verbatim_stack to properly handle nested verbatim elements - Remove unsafe code where possible, using String::from_utf8_lossy - Improve attribute handling with HashMap entry API and prioritize srcset - Simplify logic and consolidate verbatim element handling - Enhance encapsulation in LinkExtractor struct - Improve overall performance with more efficient data structures - Increase flexibility for future feature additions or modifications This refactor maintains core functionality while making the code more idiomatic Rust, easier to read and maintain, and more robust in handling edge cases. The new structure is better suited for future extensions or modifications.
- Loading branch information