diff options
Diffstat (limited to '')
-rw-r--r-- | src/construct/partial_mdx_jsx.rs | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/src/construct/partial_mdx_jsx.rs b/src/construct/partial_mdx_jsx.rs index fc03f82..2031a5a 100644 --- a/src/construct/partial_mdx_jsx.rs +++ b/src/construct/partial_mdx_jsx.rs @@ -1070,17 +1070,19 @@ pub fn es_whitespace_inside(tokenizer: &mut Tokenizer) -> State { tokenizer.consume(); State::Next(StateName::MdxJsxEsWhitespaceInside) } - _ => { + Some(_) if kind_after_index(tokenizer.parse_state.bytes, tokenizer.point.index) - == CharacterKind::Whitespace - { - tokenizer.consume(); - State::Next(StateName::MdxJsxEsWhitespaceInside) - } else { - tokenizer.exit(Name::MdxJsxEsWhitespace); - State::Ok - } + == CharacterKind::Whitespace => + { + tokenizer.consume(); + State::Next(StateName::MdxJsxEsWhitespaceInside) + } + Some(_) => { + tokenizer.exit(Name::MdxJsxEsWhitespace); + State::Ok } + // Handle EOF. + None => State::Nok, } } |