From 1867b7796b0aae1b26eeffdd525c58166c322c53 Mon Sep 17 00:00:00 2001 From: Tim Deubler Date: Tue, 14 May 2024 11:55:08 +0200 Subject: [PATCH] improved initial example selection to support special characters int title Signed-off-by: Tim Deubler --- packages/playground/src/App.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/playground/src/App.tsx b/packages/playground/src/App.tsx index 8e865dbda..b7513a57e 100644 --- a/packages/playground/src/App.tsx +++ b/packages/playground/src/App.tsx @@ -119,7 +119,7 @@ export const App: React.FC = (props: { examples: any }) => { let initExample = [0, 'Display']; const hash = window.location.hash.substr(1); if (hash) { - let [c, title] = hash.split('-'); + let [c, title] = hash.split(/-(.*)/s); if (title) { // capitalize c = decodeURI(c).split(' ').map((w) => w[0].toUpperCase() + w.slice(1)).join(' ');