Skip to content

Commit

Permalink
additional updates for 1.0
Browse files Browse the repository at this point in the history
-   re: #2
  • Loading branch information
SignpostMarv committed Sep 15, 2024
1 parent 73c69a9 commit aa2e42b
Show file tree
Hide file tree
Showing 5 changed files with 811 additions and 163 deletions.
2 changes: 1 addition & 1 deletion lib/CustomParsingTypes/TypedStringConst.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class TypedStringConst extends SupportedSubSchemaType<
.replace(/\(/g, '\\(')
.replace(/\)/g, '\\)');

return `(?:(${lazy_escape}|"${lazy_escape}"))`;
return `(?:(${lazy_escape}|"${lazy_escape}"|\\\\"${lazy_escape}\\\\"))`;
}
}

Expand Down
2 changes: 1 addition & 1 deletion lib/CustomParsingTypes/TypedStringEnum.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class TypedStringEnum extends SupportedSubSchemaType<
}
value_regex(value: enum_schema_type): string {
const enums = `(?:${value.enum.join('|')})`;
return `(?:${enums}|"${enums}")`;
return `(?:${enums}|"${enums}"|\\\\"${enums}\\\\")`;
}
}

Expand Down
3 changes: 2 additions & 1 deletion lib/CustomParsingTypes/UnrealEngineString.ts
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,8 @@ export const UnrealEngineString_left_default = [
'/Script/Engine.BlueprintGeneratedClass',
];
const right_value_starts_with_suffix =
'(?:[A-Z][A-Za-z0-9_.]+/)*[A-Z][A-Za-z_.0-9-]+(?::[A-Z][A-Za-z0-9]+)?';
// eslint-disable-next-line max-len
'(?:_?[A-Z0-9][A-Za-z0-9_.]+/)*[A-Z0-9][A-Za-z_.0-9-]+(?::[A-Z0-9][A-Za-z0-9]+)?';

export class UnrealEngineString {
private static already_configured:WeakSet<Ajv> = new WeakSet<Ajv>();
Expand Down
2 changes: 1 addition & 1 deletion lib/CustomParsingTypes/ValueToRegexFormatter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ export class ValueToRegexFormatter
return `\\(${regex}${
undefined === typed_string_array.minItems
? ''
: `(?:,${regex}){${typed_string_array.minItems - 1},}`
: `(?:, ?${regex}){${typed_string_array.minItems - 1},}`
}\\)`;
}

Expand Down
Loading

0 comments on commit aa2e42b

Please sign in to comment.