diff --git a/docs/index.html b/docs/index.html index 1c26fcd01..f49e7dd18 100644 --- a/docs/index.html +++ b/docs/index.html @@ -46,7 +46,7 @@ button.addEventListener ("click", function() { //The following regex removes all the comments from the snippet - const text = element.textContent.replace(/\/\*(.|[\r\n])*?\*\//g, '').replace(/\/\/.*/gm, ''); + const text = element.textContent; // Apparently you can't copy a variable to clipboard so you need to create text input element, // give it a value, copy it and then remove it from DOM. const textArea = document.createElement("textarea"); diff --git a/static-parts/index-start.html b/static-parts/index-start.html index 94678ecaa..2dd7839c9 100644 --- a/static-parts/index-start.html +++ b/static-parts/index-start.html @@ -46,7 +46,7 @@ button.addEventListener ("click", function() { //The following regex removes all the comments from the snippet - const text = element.textContent.replace(/\/\*(.|[\r\n])*?\*\//g, '').replace(/\/\/.*/gm, ''); + const text = element.textContent; // Apparently you can't copy a variable to clipboard so you need to create text input element, // give it a value, copy it and then remove it from DOM. const textArea = document.createElement("textarea");