Skip to content
Prev Previous commit
Next Next commit
Support single line string literal specifiers
  • Loading branch information
thecrypticace committed Nov 12, 2025
commit 3778c28363322261b3623336d6da7d322b73a7cc
6 changes: 5 additions & 1 deletion crates/oxide/src/extractor/pre_processors/ruby.rs
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ impl PreProcessor for Ruby {
b'[' => b']',
b'(' => b')',
b'{' => b'}',
b' ' => b'\n',
_ => {
cursor.advance();
continue;
Expand Down Expand Up @@ -197,7 +198,10 @@ impl PreProcessor for Ruby {

// End of the pattern, replace the boundary character with a space
_ if cursor.curr == boundary => {
result[cursor.pos] = b' ';
if boundary != b'\n' {
result[cursor.pos] = b' ';
}

break;
}

Expand Down