From 632e01b8cc96a40c4f899f71a318dcf8103191b6 Mon Sep 17 00:00:00 2001 From: Alan Rodas Bonjour Date: Thu, 5 Sep 2024 15:24:55 -0300 Subject: [PATCH] fix: privateRemarks should span multiple paragraphs The current implementation expects that privateRemarks is followed by one and only one paragraph. This commit fixes this issue allowing that multiple paragraphs can be used as privateRemarks. --- CHANGELOG.md | 5 +++++ package.json | 2 +- src/static/assets/js/typedoc-theme-gobstones.js | 10 +++++++--- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2ed3da7..289a147 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +## 0.3.1 (2024-09-05) + +- fix: privateRemarks should span multiple paragraphs ([032c993](https://github.com/gobstones/typedoc-theme-gobstones/commit/032c993)) +- build: updated gobstones-scripts to 0.9.2 ([42a28e0](https://github.com/gobstones/typedoc-theme-gobstones/commit/42a28e0)) + ## 0.3.0 (2024-09-04) ## 0.2.1 (2024-08-09) diff --git a/package.json b/package.json index 3b2fb1e..203ca54 100755 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@gobstones/typedoc-theme-gobstones", "description": "A simple theme for the Gobstones generated documentation.", - "version": "0.3.0", + "version": "0.3.1", "keywords": ["Gobstones", "typedoc-theme", "typedoc-theme-gobstones"], "repository": { "type": "git", diff --git a/src/static/assets/js/typedoc-theme-gobstones.js b/src/static/assets/js/typedoc-theme-gobstones.js index 3b3f0ed..71d72a8 100644 --- a/src/static/assets/js/typedoc-theme-gobstones.js +++ b/src/static/assets/js/typedoc-theme-gobstones.js @@ -4,9 +4,13 @@ document.addEventListener('DOMContentLoaded', () => { const privateRemarks = document.getElementById('Private Remarks'); if (!privateRemarks) return; const privateRemarksTitle = privateRemarks.parentElement; - const privateRemarksText = privateRemarksTitle.nextElementSibling; privateRemarksTitle.classList.add('tsd-is-internal'); privateRemarksTitle.classList.add('tsd-private-remarks'); - privateRemarksText.classList.add('tsd-is-internal'); - privateRemarksText.classList.add('tsd-private-remarks'); + + let privateRemarksText = privateRemarksTitle.nextElementSibling; + while (privateRemarksText) { + privateRemarksText.classList.add('tsd-is-internal'); + privateRemarksText.classList.add('tsd-private-remarks'); + privateRemarksText = privateRemarksText.nextElementSibling; + } });