fix at_beginning

This commit is contained in:
Kangzhi Shi
2021-01-21 16:14:23 +02:00
parent f2311b56fc
commit 6a792324b0

View File

@@ -274,7 +274,8 @@ trait MatchContextDrive {
self.state().pattern_codes.len() - self.ctx().code_position
}
fn at_beginning(&self) -> bool {
self.ctx().string_position == self.state().start
// self.ctx().string_position == self.state().start
self.ctx().string_position == 0
}
fn at_end(&self) -> bool {
self.ctx().string_position == self.state().end