LibWeb: In the HTML tokenizer, pretty up ON_WHITESPACE a tiny bit

No behavior change.
This commit is contained in:
Nico Weber 2020-10-09 11:25:10 -04:00 committed by Andreas Kling
parent 151b8b5984
commit f3b4fbf01f
Notes: sideshowbarker 2024-07-19 01:57:12 +09:00

View file

@ -29,6 +29,7 @@
#include <LibWeb/HTML/Parser/HTMLToken.h>
#include <LibWeb/HTML/Parser/HTMLTokenizer.h>
#include <ctype.h>
#include <string.h>
namespace Web::HTML {
@ -137,7 +138,7 @@ namespace Web::HTML {
if (current_input_character.has_value() && isxdigit(current_input_character.value()))
#define ON_WHITESPACE \
if (current_input_character.has_value() && (current_input_character.value() == '\t' || current_input_character.value() == '\n' || current_input_character.value() == '\f' || current_input_character.value() == ' '))
if (current_input_character.has_value() && strchr("\t\n\f ", current_input_character.value()))
#define ANYTHING_ELSE if (1)