Skip to content

Commit

Permalink
improved initial example selection to support special characters int …
Browse files Browse the repository at this point in the history
…title

Signed-off-by: Tim Deubler <[email protected]>
  • Loading branch information
TerminalTim committed May 14, 2024
1 parent 7b3a518 commit 1867b77
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/playground/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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(' ');
Expand Down

0 comments on commit 1867b77

Please sign in to comment.