mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 15:40:19 +00:00
Shell: Consider numbers as word characters too
Otherwise `foobar2` wouldn't be a valid identifier
This commit is contained in:
parent
8cfda86a45
commit
fc7a06af9d
Notes:
sideshowbarker
2024-07-18 23:03:55 +09:00
Author: https://github.com/alimpfard Commit: https://github.com/SerenityOS/serenity/commit/fc7a06af9d3 Pull-request: https://github.com/SerenityOS/serenity/pull/4996
1 changed files with 2 additions and 2 deletions
|
@ -330,9 +330,9 @@ private:
|
|||
mutable bool m_last_continuation_state { false }; // false == not needed.
|
||||
};
|
||||
|
||||
static constexpr bool is_word_character(char c)
|
||||
[[maybe_unused]] static constexpr bool is_word_character(char c)
|
||||
{
|
||||
return c == '_' || (c <= 'Z' && c >= 'A') || (c <= 'z' && c >= 'a');
|
||||
return c == '_' || (c <= 'Z' && c >= 'A') || (c <= 'z' && c >= 'a') || (c <= '9' && c >= '0');
|
||||
}
|
||||
|
||||
inline size_t find_offset_into_node(const String& unescaped_text, size_t escaped_offset)
|
||||
|
|
Loading…
Reference in a new issue