From b906a2454d0bcf72fd175d0187f9a4177da5d563 Mon Sep 17 00:00:00 2001 From: pokepetter Date: Mon, 13 May 2024 23:53:04 +0200 Subject: [PATCH] fixed copy code buttons. --- docs/documentation_generator.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/documentation_generator.py b/docs/documentation_generator.py index 97dd88ff..96944c81 100644 --- a/docs/documentation_generator.py +++ b/docs/documentation_generator.py @@ -27,12 +27,12 @@ document.getElementById("checkbox").checked = checked; function copy_to_clipboard(containerid) { - var range = document.createRange(); - range.selectNode(containerid); //changed here - window.getSelection().removeAllRanges(); - window.getSelection().addRange(range); - document.execCommand("copy"); - window.getSelection().removeAllRanges(); + var range = document.createRange() + range.selectNode(containerid) + window.getSelection().removeAllRanges() + window.getSelection().addRange(range) + document.execCommand("copy") + window.getSelection().removeAllRanges() } @@ -720,7 +720,7 @@ def html_color(value): if data.example: html += '
example:
\n' - html += f'
{data.example}\n
\n' + html += f'

{data.example}

\n
\n' html = html.replace('', '')