Skip to content

Commit

Permalink
ignore case for placeholder mapping
Browse files Browse the repository at this point in the history
  • Loading branch information
AntonOellerer committed Sep 30, 2022
1 parent b398aca commit 02b3141
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ plugins {
}

group 'com.docutools'
version = '1.5.4'
version = '1.5.5'

sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public Optional<String> map(String placeholder) {
if (placeholderMappings == null) {
return Optional.empty();
}
return Optional.ofNullable(placeholderMappings.get(placeholder));
return Optional.ofNullable(placeholderMappings.get(placeholder.toLowerCase()));
}

@Override
Expand All @@ -47,7 +47,7 @@ private static void setup() {
.filter(line -> !line.isEmpty())
.filter(line -> !line.startsWith("//"))
.map(line -> line.split(":"))
.collect(Collectors.toMap(strings -> strings[0], strings -> strings[1]));
.collect(Collectors.toMap(strings -> strings[0].toLowerCase(), strings -> strings[1]));
logger.info("Parsed mappings");
} catch (IOException e) {
logger.error(e);
Expand Down

0 comments on commit 02b3141

Please sign in to comment.