mirror of
https://github.com/zebrajr/ladybird.git
synced 2025-12-06 00:19:53 +01:00
LibWeb: Make offset for HTML style and script elements one after
This commit is contained in:
parent
ffd5503dcb
commit
ac22e71184
|
|
@ -68,11 +68,13 @@ void SyntaxHighlighter::rehighlight(Palette const& palette)
|
|||
if (token->tag_name() == "script"sv) {
|
||||
tokenizer.switch_to(HTMLTokenizer::State::ScriptData);
|
||||
state = State::Javascript;
|
||||
substring_start_position = { token->end_position().line, token->end_position().column };
|
||||
// The end position points to the '>' character, but we need the position after it
|
||||
substring_start_position = { token->end_position().line, token->end_position().column + 1 };
|
||||
} else if (token->tag_name() == "style"sv) {
|
||||
tokenizer.switch_to(HTMLTokenizer::State::RAWTEXT);
|
||||
state = State::CSS;
|
||||
substring_start_position = { token->end_position().line, token->end_position().column };
|
||||
// The end position points to the '>' character, but we need the position after it
|
||||
substring_start_position = { token->end_position().line, token->end_position().column + 1 };
|
||||
}
|
||||
} else if (token->is_end_tag()) {
|
||||
if (token->tag_name().is_one_of("script"sv, "style"sv)) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user