From 3467a9c5f7c99709256b56865ebd7e19cf398d63 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kamil=20Krzy=C5=9Bk=C3=B3w?= Date: Wed, 25 Sep 2024 20:49:28 +0200 Subject: [PATCH] fix: hex conversion in javascript --- mkdocs_nype/templates/assets/javascripts/nype-core.js | 1 + pyproject.toml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/mkdocs_nype/templates/assets/javascripts/nype-core.js b/mkdocs_nype/templates/assets/javascripts/nype-core.js index 7b90e22..9cfbd88 100644 --- a/mkdocs_nype/templates/assets/javascripts/nype-core.js +++ b/mkdocs_nype/templates/assets/javascripts/nype-core.js @@ -5,6 +5,7 @@ const _gNypeDebug = function () { }; const _gNypeConvertHexToString = (hexData) => { + if (!hexData) return hexData; return atob(String.fromCharCode(...hexData.match(/.{1,2}/g).map(byte => parseInt(byte, 16)))); }; diff --git a/pyproject.toml b/pyproject.toml index 051be7e..5efe48a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -7,7 +7,7 @@ build-backend = "hatchling.build" [project] name = "mkdocs-nype" -version = "0.16.6" +version = "0.16.7" description = "MkDocs theme for Nype MkDocs projects, extends the Material for MkDocs theme" authors = [ { name = "Kamil Krzyśków", email = "kk@npe.cm" }