diff options
author | Georg Brandl <georg@python.org> | 2020-09-01 12:52:11 +0200 |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2020-09-01 12:52:11 +0200 |
commit | 54b1d0e2022bf97f3cee61cbb251b73e94ed8bcf (patch) | |
tree | b075eee9bf67a0a25ed3183a0d9af257f8930385 | |
parent | bb7aa2badc9f5e6e009d18cfe3d5889ea01f4725 (diff) | |
download | pygments-git-54b1d0e2022bf97f3cee61cbb251b73e94ed8bcf.tar.gz |
demo: show Pygments version in use
-rw-r--r-- | doc/_static/demo.js | 3 | ||||
-rw-r--r-- | doc/_templates/demo.html | 1 |
2 files changed, 4 insertions, 0 deletions
diff --git a/doc/_static/demo.js b/doc/_static/demo.js index f538492e..872c2348 100644 --- a/doc/_static/demo.js +++ b/doc/_static/demo.js @@ -23,6 +23,9 @@ languagePluginLoader.then(() => { } } + var ver = pyodide.runPython('pygments.__version__'); + document.getElementById("try-version").innerText = "Pygments version: " + ver; + document.getElementById("hlbtn").disabled = false; document.getElementById("loading").style.display = "none"; }); diff --git a/doc/_templates/demo.html b/doc/_templates/demo.html index bc788d1a..fc511014 100644 --- a/doc/_templates/demo.html +++ b/doc/_templates/demo.html @@ -19,6 +19,7 @@ a WebAssembly translation of Pygments, courtesy of <a href="https://github.com/iodide-project/pyodide">Pyodide</a>.</p> <p>Your content is neither sent over the web nor stored anywhere.</p> +<p id="try-version"></p> <div id="try"> <h2>Enter code and select a language</h2> |