Skip to content

Commit

Permalink
LibWeb: In the HTML tokenizer, pretty up ON_WHITESPACE a tiny bit
Browse files Browse the repository at this point in the history
No behavior change.
  • Loading branch information
nico authored and awesomekling committed Oct 9, 2020
1 parent 151b8b5 commit f3b4fbf
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Libraries/LibWeb/HTML/Parser/HTMLTokenizer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 {

Expand Down Expand Up @@ -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)

Expand Down

0 comments on commit f3b4fbf

Please sign in to comment.