From 118dba1aa12f15b7231d4265b1955ab8a01e96e8 Mon Sep 17 00:00:00 2001 From: Javier Godoy <11554739+javier-godoy@users.noreply.github.com> Date: Wed, 3 Jul 2024 12:31:54 -0300 Subject: [PATCH] fix: do not remove suffix from "Basic Demo" --- .../com/flowingcode/vaadin/addons/demo/EnhancedRouteTabs.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/flowingcode/vaadin/addons/demo/EnhancedRouteTabs.java b/src/main/java/com/flowingcode/vaadin/addons/demo/EnhancedRouteTabs.java index 1618bb5..6a10fc9 100644 --- a/src/main/java/com/flowingcode/vaadin/addons/demo/EnhancedRouteTabs.java +++ b/src/main/java/com/flowingcode/vaadin/addons/demo/EnhancedRouteTabs.java @@ -44,7 +44,9 @@ public class EnhancedRouteTabs extends Composite implements Before private final Map routerLinkTabMap = new LinkedHashMap<>(); public void add(String text, Class target) { - text = text.replaceFirst("\\s++[Dd]emo$", ""); + if (!text.equals("Basic Demo")) { + text = text.replaceFirst("\\s++[Dd]emo$", ""); + } RouterLink routerLink = getContent().addRouterLink(text, target); routerLink.setHighlightCondition(HighlightConditions.sameLocation()); routerLink.setHighlightAction(