Skip to content

Commit aa76797

Browse files
committed
align extend to latin B
1 parent 234c0c8 commit aa76797

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

LuaParser/src/File/LuaSource.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,8 @@ bool LuaSource::CheckNonUniformCharBefore(std::size_t offset) const {
6868
std::size_t byteNum = 0;
6969
for (std::size_t i = lineStartOffset; i < offset; i += byteNum) {
7070
auto codepoint = utf8::Utf8ToUnicode(_source.data() + i, _source.size() - i, byteNum);
71-
// support UTF-8 Basic Latin and Latin-1 Supplement
72-
if (codepoint > 0xff) {
71+
// support UTF-8 Latin B
72+
if (codepoint > 0x24F) {
7373
return true;
7474
}
7575
}

Test2/src/FormatTest2.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,11 @@
88

99
int main() {
1010
std::string buffer = R"(
11-
local t = 1 .. "1231"
11+
with_latin_extended_a = {
12+
{ 'aaaa', nil },
13+
{ 'ő', nil }, -- U+0151
14+
{ 'ű', nil }, -- U+0171
15+
}
1216
)";
1317

1418
auto file = std::make_shared<LuaSource>(std::move(buffer));

0 commit comments

Comments
 (0)