0x6b / copy-selection-as-markdown

Firefox add-on to copy selection as Markdown
https://addons.mozilla.org/en-US/firefox/addon/copy-selection-as-markdown/
MIT License
190 stars 14 forks source link

Feature request: better handling of named anchor #112

Open tsaost opened 2 years ago

tsaost commented 2 years ago

First of all, thank you for this great extension. I was going to write a simple extension that will capture URLs from links and embed them inside plain text before copying them to the clipboard, but your extension is way better.

The extension currently does not handle named anchors properly, it would be nice if you can add this in the future.

At the moment, instead of saving the named anchor as #anchor, it actually save the link as http://page_full_url#anchor, and the anchor itself is not saved.

It would also be nice to have an option to actually skip named anchors that matches a certain regexp. For example, if you try to capture postings from stackoverflow.com the extension currently generate many links such as https://stackoverflow.com/questions/6695439/how-to-link-to-a-named-anchor-in-multimarkdown# "This comment adds something useful to the post".

On a related issues, it would be nice if duplicate links can be consolidated into one single entry if one chooses to save them as footnote links.