aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/twbs/bootstrap/site/assets/js/code-examples.js
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2023-05-17 13:28:23 +0000
committerMario <mario@mariovavti.com>2023-05-17 13:28:23 +0000
commit65d98af24c3c7b784f7e2c95998df65901011ce3 (patch)
treed7d6a60698d7a0c3704ea55cb71c543285186b17 /vendor/twbs/bootstrap/site/assets/js/code-examples.js
parenta57739c462a7991bf2130e8eca0c383eb276f0cd (diff)
parent62d35627f35537d0056482047e74a27ad837c3cf (diff)
downloadvolse-hubzilla-65d98af24c3c7b784f7e2c95998df65901011ce3.tar.gz
volse-hubzilla-65d98af24c3c7b784f7e2c95998df65901011ce3.tar.bz2
volse-hubzilla-65d98af24c3c7b784f7e2c95998df65901011ce3.zip
Merge branch '8.4RC'8.4
Diffstat (limited to 'vendor/twbs/bootstrap/site/assets/js/code-examples.js')
-rw-r--r--vendor/twbs/bootstrap/site/assets/js/code-examples.js9
1 files changed, 5 insertions, 4 deletions
diff --git a/vendor/twbs/bootstrap/site/assets/js/code-examples.js b/vendor/twbs/bootstrap/site/assets/js/code-examples.js
index edb13598f..e1f680e7e 100644
--- a/vendor/twbs/bootstrap/site/assets/js/code-examples.js
+++ b/vendor/twbs/bootstrap/site/assets/js/code-examples.js
@@ -4,8 +4,7 @@
/*!
* JavaScript for Bootstrap's docs (https://getbootstrap.com/)
- * Copyright 2011-2022 The Bootstrap Authors
- * Copyright 2011-2022 Twitter, Inc.
+ * Copyright 2011-2023 The Bootstrap Authors
* Licensed under the Creative Commons Attribution 3.0 Unported License.
* For details, see https://creativecommons.org/licenses/by/3.0/.
*/
@@ -14,6 +13,7 @@
(() => {
'use strict'
+
// Insert copy to clipboard button before .highlight
const btnTitle = 'Copy to clipboard'
const btnEdit = 'Edit on StackBlitz'
@@ -28,7 +28,7 @@
'</div>'
].join('')
- // wrap programmatically code blocks and add copy btn.
+ // Wrap programmatically code blocks and add copy btn.
document.querySelectorAll('.highlight')
.forEach(element => {
if (!element.closest('.bd-example-snippet')) { // Ignore examples made be shortcode
@@ -52,7 +52,8 @@
snippetButtonTooltip('.btn-edit', btnEdit)
const clipboard = new ClipboardJS('.btn-clipboard', {
- target: trigger => trigger.closest('.bd-code-snippet').querySelector('.highlight')
+ target: trigger => trigger.closest('.bd-code-snippet').querySelector('.highlight'),
+ text: trigger => trigger.closest('.bd-code-snippet').querySelector('.highlight').textContent.trimEnd()
})
clipboard.on('success', event => {