markdown-clipper icon indicating copy to clipboard operation
markdown-clipper copied to clipboard

contents of <h1> tag is missing and <h> tag with hyperlink generates something wired

Open supernatural opened this issue 4 years ago • 1 comments

Here is an example, clip a minimal html page like this:

<html>
    <head><title>test</title></head>
    <body>
        <div> 
            <h1>head line</h1> 
            <p> some text...
        </div> 
    </body>
</html>

the content of '<h1>' tag 'head line' is missing from the clipped md file:

# test
  
> some text...

some text...


[Source](http://localhost/test.html)

Other '<h>' works fine, but generates something wired if using inside '<a>' tag, like this:

<html>
    <head><title>test</title></head>
    <body>
        <div>
            <a href="another.html"><h2>head line</h2></a>
            <p> some text...
        </div>
    </body>
</html>

clipped md file:

# test
  
> some text...

[

head line
---------

](moz-extension://64d4a8af-1ca1-49dc-be66-b5e93cc71283/another.html)

some text...


[Source](http://localhost/test.html)

expected something like '## [head line](http://localhost/another.html)'

supernatural avatar Jul 08 '20 10:07 supernatural

I can see the same behavior with the Chrome Extension.

> Take a look at the [Settings page](chrome-extension://cjedbglnccaioiolemnfhjncicchinao/reference/settings/) to see options on how to customise all Zettelkasten functionality to your liking.

It feels the link is generated in the context of the extension instead of the content of the page, and it results in a wrong link with an incorrect "base URL".

lobre avatar Aug 20 '20 12:08 lobre