Skip to content

Commit

Permalink
Remove correctly .bd-example
Browse files Browse the repository at this point in the history
  • Loading branch information
julien-deramond authored and mdo committed May 26, 2022
1 parent cda3087 commit c7f240c
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions site/layouts/partials/scripts.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,7 @@
const htmlSnippet = event.target.closest('.bd-code-snippet').querySelector('.bd-example').innerHTML

// Get extra classes for this example except '.bd-example'
const classes = event.target.closest('.bd-code-snippet').querySelector('.bd-example').classList
if (classes) {
classes.remove('bd-example')
}
const classes = Array.from(event.target.closest('.bd-code-snippet').querySelector('.bd-example').classList).filter(x => x !== 'bd-example').join(' ')

const jsSnippet = event.target.closest('.bd-code-snippet').querySelector('.btn-edit').getAttribute('data-js-snippet')
StackBlitzSDK.openBootstrapSnippet(htmlSnippet, jsSnippet, classes)
Expand Down

0 comments on commit c7f240c

Please sign in to comment.