Skip to content

Commit aa99020

Browse files
authored
Merge pull request #187 from structuredllm/bug
Fix a minor bug
2 parents c117ce6 + 36023a5 commit aa99020

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

syncode/mask_store/mask_store.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -269,10 +269,10 @@ def _remove_left_whitespace(
269269
if (self._fsms.initial(fsm_state.terminal) == fsm_state or self._fsms.is_final(fsm_state)) and self._ignore_whitespace:
270270
if isinstance(remainder, bytes):
271271
# For bytes, use lstrip() to remove all leading whitespace
272-
remainder = remainder.lstrip()
272+
remainder = remainder.lstrip(b' ')
273273
elif isinstance(remainder, str):
274274
# For strings, use lstrip() to remove all leading whitespace
275-
remainder = remainder.lstrip()
275+
remainder = remainder.lstrip(' ')
276276
return remainder
277277

278278
def _lookup_next_tokens_for_fsm_state(self, fsm_state: JointFSMState, next_terminal) -> torch.Tensor:

0 commit comments

Comments
 (0)