mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-22 17:28:30 +00:00
LibWeb: Add a super basic HTML syntax highlighter
This can currently highlight tag names and attribute names/values.
This commit is contained in:
committed by
Andreas Kling
parent
aa7939bc6c
commit
97a230e4ef
@@ -229,6 +229,11 @@ Optional<u32> HTMLTokenizer::peek_code_point(size_t offset) const
|
||||
|
||||
Optional<HTMLToken> HTMLTokenizer::next_token()
|
||||
{
|
||||
{
|
||||
auto last_position = m_source_positions.last();
|
||||
m_source_positions.clear();
|
||||
m_source_positions.append(move(last_position));
|
||||
}
|
||||
_StartOfFunction:
|
||||
if (!m_queued_tokens.is_empty())
|
||||
return m_queued_tokens.dequeue();
|
||||
|
||||
Reference in New Issue
Block a user