From c385d79b064e86a47b1bae89ae25b5693cb6cdf6 Mon Sep 17 00:00:00 2001
From: wheelercj <chrisw289@gmail.com>
Date: Thu, 12 Sep 2024 17:49:10 -0700
Subject: [PATCH 1/2] Improve descriptions

---
 README.md | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/README.md b/README.md
index b51f678..8d2386a 100644
--- a/README.md
+++ b/README.md
@@ -92,12 +92,12 @@ You're welcome to [make a feature request](https://github.com/Stardown-app/Stard
 ### Paste structured data
 
 * [obsidian-ReadItLater](https://github.com/DominikPieper/obsidian-ReadItLater) is an Obsidian plugin that creates notes with specific structures from clipboard content based on where it was copied from.
-* [Advanced Paste](https://learn.microsoft.com/en-us/windows/powertoys/advanced-paste) is a Windows-only [PowerToys](https://learn.microsoft.com/en-us/windows/powertoys/install) feature made by Microsoft that converts clipboard content to other formats like markdown or JSON.
+* [Advanced Paste](https://learn.microsoft.com/en-us/windows/powertoys/advanced-paste) is a Windows-only [PowerToys](https://learn.microsoft.com/en-us/windows/powertoys/install) feature made by Microsoft that converts clipboard content to other markup languages like markdown or JSON.
 
-### Copy links in other formats besides markdown
+### Copy web page links in other markup languages besides markdown
 
 * [url2clipboard](https://github.com/asamuzaK/url2clipboard) supports HTML, Markdown, BBCode, Textile, AsciiDoc, MediaWiki, Jira, reStructuredText, LaTeX, Org Mode, and text.
-* [TabCopy](https://chromewebstore.google.com/detail/tabcopy/micdllihgoppmejpecmkilggmaagfdmb) might only be on the Chrome Web Store, but supports many formats including HTML, Markdown, BBCode, CSV, and JSON, and lets you create custom link formats.
+* [TabCopy](https://chromewebstore.google.com/detail/tabcopy/micdllihgoppmejpecmkilggmaagfdmb) might only be on the Chrome Web Store, but supports many markup languages including HTML, Markdown, BBCode, CSV, and JSON, and lets you create custom link formats.
 
 ### Copy just the titles or just the URLs of all tabs
 

From 6505cde5a60a4bc56b5c4dffa37828e79747fa48 Mon Sep 17 00:00:00 2001
From: wheelercj <chrisw289@gmail.com>
Date: Thu, 12 Sep 2024 17:51:41 -0700
Subject: [PATCH 2/2] Compute style when removing hidden nodes

Using `currentNode.style` only gives inline styles, but
`doc.defaultView.getComputedStyle(currentNode)` is supposed to get all
CSS properties. For some reason, the function still does not correctly
detect the `display: none` of the `descriptor` class applied to many
elements on https://arxiv.org/abs/2306.03872.
---
 src/converters/utils/html.js | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/src/converters/utils/html.js b/src/converters/utils/html.js
index 19244ee..4fff991 100644
--- a/src/converters/utils/html.js
+++ b/src/converters/utils/html.js
@@ -24,11 +24,14 @@ export function removeHiddenElements(node, doc) {
     const SHOW_ELEMENT = 1;
     const iterator = doc.createNodeIterator(node, SHOW_ELEMENT);
 
+    const ELEMENT_NODE = 1;
     let currentNode = iterator.nextNode();
     while (currentNode) {
-        const style = currentNode.style;
-        if (style.display === "none" || style.visibility === "hidden") {
-            currentNode.parentNode.removeChild(currentNode);
+        if (currentNode.nodeType === ELEMENT_NODE) {
+            const style = doc.defaultView.getComputedStyle(currentNode);
+            if (style.display === 'none' || style.visibility === 'hidden') {
+                currentNode.parentNode.removeChild(currentNode);
+            }
         }
 
         currentNode = iterator.nextNode();