Skip to content

Commit

Permalink
inlines: fix smart next char check
Browse files Browse the repository at this point in the history
EOF here means we bail out, not continue
  • Loading branch information
kivikakk committed Mar 31, 2023
1 parent e7d1985 commit 44f501f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/parser/inlines.rs
Original file line number Diff line number Diff line change
Expand Up @@ -658,7 +658,7 @@ impl<'a, 'r, 'o, 'd, 'i, 'c, 'subj> Subject<'a, 'r, 'o, 'd, 'i, 'c, 'subj> {
let start = self.pos;
self.pos += 1;

if !self.options.parse.smart || self.peek_char().map_or(false, |&c| c != b'-') {
if !self.options.parse.smart || self.peek_char().map_or(true, |&c| c != b'-') {
return self.make_inline(NodeValue::Text("-".to_string()), self.pos - 1, self.pos - 1);
}

Expand Down

0 comments on commit 44f501f

Please sign in to comment.