Skip to content

Commit ef3a8cc

Browse files
committed
Only match expected string literal specifiers
1 parent bff4739 commit ef3a8cc

File tree

1 file changed

+2
-2
lines changed
  • crates/oxide/src/extractor/pre_processors

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,8 +143,8 @@ impl PreProcessor for Ruby {
143143
_ => {}
144144
}
145145

146-
// Looking for `%w` or `%W`
147-
if cursor.curr != b'%' && !matches!(cursor.next, b'w' | b'W') {
146+
// Looking for `%w`, `%W`, or `%p`
147+
if cursor.curr != b'%' || !matches!(cursor.next, b'w' | b'W' | b'p') {
148148
cursor.advance();
149149
continue;
150150
}

0 commit comments

Comments
 (0)