You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: handle invalid UTF-8 in Ruby and Vue preprocessors
The Ruby and Vue preprocessors were using `from_utf8().unwrap()` which
panics when processing files containing invalid UTF-8 bytes. This can
happen when:
- Binary files are inadvertently scanned
- Files are truncated at multi-byte character boundaries
- Files use non-UTF-8 encodings
This change wraps the UTF-8 conversion in `if let Ok(...)` to gracefully
skip the regex-based template extraction when UTF-8 conversion fails,
while still allowing the byte-level processing to continue (in Ruby's
case).
Fixes panic: `thread panicked at crates/oxide/src/extractor/pre_processors/ruby.rs:37:59`
0 commit comments