Fix detection of tag type for unquoted string values
This commit is contained in:
parent
3e7bae969e
commit
4ac95f605b
2 changed files with 8 additions and 1 deletions
|
@ -41,14 +41,19 @@ enum TagType {
|
|||
return TagType.End;
|
||||
}
|
||||
|
||||
static const ALPHABET = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
|
||||
|
||||
static TagType getStringifiedTagType(StringReader reader) {
|
||||
reader.startSeek();
|
||||
TagType ret = TagType.End;
|
||||
bool isNumber = true;
|
||||
bool isAlpha = true; // Is digits only
|
||||
|
||||
// Start to determine the next tag type
|
||||
while (reader.canRead && ret == TagType.End) {
|
||||
var val = reader.next().toUpperCase();
|
||||
if (ALPHABET.indexOf(val) == -1) isAlpha = false;
|
||||
|
||||
switch (val) {
|
||||
case "{":
|
||||
{
|
||||
|
@ -137,6 +142,8 @@ enum TagType {
|
|||
}
|
||||
|
||||
reader.endSeek();
|
||||
if (!isNumber && isAlpha) ret = TagType.String;
|
||||
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
name: libac_dart
|
||||
description: "Aria's Creations code library"
|
||||
version: 1.0.36
|
||||
version: 1.0.37
|
||||
homepage: "https://zontreck.com"
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue