Skip to content

Commit 1867b77

Browse files
committed
improved initial example selection to support special characters int title
Signed-off-by: Tim Deubler <tim.deubler@here.com>
1 parent 7b3a518 commit 1867b77

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/playground/src/App.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ export const App: React.FC = (props: { examples: any }) => {
119119
let initExample = [0, 'Display'];
120120
const hash = window.location.hash.substr(1);
121121
if (hash) {
122-
let [c, title] = hash.split('-');
122+
let [c, title] = hash.split(/-(.*)/s);
123123
if (title) {
124124
// capitalize
125125
c = decodeURI(c).split(' ').map((w) => w[0].toUpperCase() + w.slice(1)).join(' ');

0 commit comments

Comments
 (0)