Skip to content

Commit

Permalink
fix escaping $ in uniqueId
Browse files Browse the repository at this point in the history
  • Loading branch information
schultek committed Dec 3, 2023
1 parent e1f770f commit f4da04d
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@ abstract class ClassMapperElement extends InterfaceMapperElement<ClassElement>
late final String className = element.name;

late final String uniqueId =
annotation.value?.read('uniqueId')?.toStringValue() ?? className;
(annotation.value?.read('uniqueId')?.toStringValue() ?? className)
.replaceAll('\$', '\\\$')
.replaceAll("(?<!\\)'", "\\'");

// --- Generator configuration ---

Expand Down

0 comments on commit f4da04d

Please sign in to comment.