Skip to content

Commit

Permalink
[fix] a bug where \s did not match whitespace.
Browse files Browse the repository at this point in the history
  • Loading branch information
ShinobuAmasaki committed Aug 6, 2024
1 parent 19a87f4 commit e127045
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/segment_m.F90
Original file line number Diff line number Diff line change
Expand Up @@ -290,9 +290,12 @@ pure function symbol_to_segment(symbol) result(res)
integer(int32) :: i, i_end, code

! If `symbol` is a empty character, return SEG_EMPTY
if (symbol == '') then
if (symbol == char(0)) then
res = SEG_EMPTY
return
else if (symbol == char(32)) then
res = SEG_SPACE
return
end if

! Initialize indices
Expand Down

0 comments on commit e127045

Please sign in to comment.