Skip to content

Commit bff4739

Browse files
committed
Support single line string literal specifiers
1 parent 41d3f41 commit bff4739

File tree

1 file changed

+5
-1
lines changed
  • crates/oxide/src/extractor/pre_processors

1 file changed

+5
-1
lines changed

crates/oxide/src/extractor/pre_processors/ruby.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,7 @@ impl PreProcessor for Ruby {
156156
b'[' => b']',
157157
b'(' => b')',
158158
b'{' => b'}',
159+
b' ' => b'\n',
159160
_ => {
160161
cursor.advance();
161162
continue;
@@ -197,7 +198,10 @@ impl PreProcessor for Ruby {
197198

198199
// End of the pattern, replace the boundary character with a space
199200
_ if cursor.curr == boundary => {
200-
result[cursor.pos] = b' ';
201+
if boundary != b'\n' {
202+
result[cursor.pos] = b' ';
203+
}
204+
201205
break;
202206
}
203207

0 commit comments

Comments
 (0)