Skip to content

Commit

Permalink
Fix issue when comment was ended too soon
Browse files Browse the repository at this point in the history
  • Loading branch information
stirante authored Mar 24, 2022
1 parent b3235b1 commit ed254bd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions translator.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,12 @@ func translate(s []byte) []byte {
i++
continue
}
if comment.startted && !comment.isSingleLined {
if ch == ASTERISK {
if comment.startted {
if ch == ASTERISK && !comment.isSingleLined {
comment.canEnd = true
continue
}
if comment.canEnd && ch == SLASH {
if comment.canEnd && ch == SLASH && !comment.isSingleLined {
comment.stop()
continue
}
Expand Down

0 comments on commit ed254bd

Please sign in to comment.