Skip to content

Commit

Permalink
Do not append number when using real item names
Browse files Browse the repository at this point in the history
Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
  • Loading branch information
jlaur committed Oct 14, 2022
1 parent 37a91ab commit c843a1c
Showing 1 changed file with 3 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -377,16 +377,11 @@ private void formatTableNames() {
}

private String getTableName(int rowId, String itemName) {
return getTableNamePrefix(itemName) + formatRight(rowId, conf.getTableIdDigitCount());
}

private String getTableNamePrefix(String itemName) {
String name = conf.getTableNamePrefix();
if (conf.getTableUseRealItemNames()) {
// Create the table name with real Item Names
name = (itemName.replaceAll(ITEM_NAME_PATTERN, "") + "_").toLowerCase();
return (itemName.replaceAll(ITEM_NAME_PATTERN, "")).toLowerCase();
} else {
return conf.getTableNamePrefix() + formatRight(rowId, conf.getTableIdDigitCount());
}
return name;
}

public Set<PersistenceItemInfo> getItems() {
Expand Down

0 comments on commit c843a1c

Please sign in to comment.