Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nothing gets copied to clipboard #18

Closed
Korodny opened this issue Dec 21, 2018 · 8 comments
Closed

Nothing gets copied to clipboard #18

Korodny opened this issue Dec 21, 2018 · 8 comments

Comments

@Korodny
Copy link

Korodny commented Dec 21, 2018

Firefox 60.4.0esr on Debian Testing, just installed the extension from AMO.

Trying to copy a selection of text containing headings, numbered lists etc. from this page, nothing ever reaches the clipboard.

Here's the only output I get in the web console:

JQMIGRATE: Migrate is installed, version 1.4.1
_static:9:542
TypeError: a.getAttribute(...) is null
Stack trace:
getSelectionAsMarkdown@moz-extension://0bd6bf0b-eb6e-469a-922c-b2e7fb3b7852/copy.js:161:12
main@moz-extension://0bd6bf0b-eb6e-469a-922c-b2e7fb3b7852/copy.js:94:21
copy.js:122:5
@0x6b
Copy link
Owner

0x6b commented Jan 4, 2019

@Korodny thank you for the issue. I found an issue where the plugin failed to handle a tag without href attribute. Will release new version shortly.

@0x6b
Copy link
Owner

0x6b commented Jan 4, 2019

@Korodny I just published v0.6.1 which fixes the issue. Please grab the update from you add-on page (Tools -> Add-ons -> Gear icon -> Check for Updates). Please open a new issue if you find any issue. Thanks!

@Korodny
Copy link
Author

Korodny commented Jan 4, 2019

@0x6b Updated to the new version, stuff gets properly added to clipboard now. I did notice a few minor things though, do you want new issues for all of those? I copied chapters content, 1 and 2 including the headings from the above page and had a look at the result:

  1. highlighted text is deselected after it is copied to clipboard. traditional copy-to-clipboard doesn't do that
  2. when I paste the clipboard content into my text editor, dots in headings are escaped with a backslash
  3. the extension treats the entire content I copied as a blockquote, i.e. all lines start with ">". Not sure what's causing this
  4. nested lists seem to be a problem (i.e. they're just treated as one giant list). not sure how well markdown handles such a case though, never had to deal with nested lists in markdown

(Edit: dots in headings and the topmost level of the nested list are escaped)

@0x6b
Copy link
Owner

0x6b commented Jan 7, 2019

  1. highlighted text is deselected after it is copied to clipboard. traditional copy-to-clipboard doesn't do that

Opened #20. I was not aware of this but it'd be good for me as well to sort out this. Will update shortly.

  1. when I paste the clipboard content into my text editor, dots in headings are escaped with a backslash

Updating Turndown, which actually converts HTML to markdown, to 5.0 might change this behavior (see https://github.com/domchristie/turndown#escaping-markdown-characters for detail). It will take some time. Please watch #21.

  1. the extension treats the entire content I copied as a blockquote, i.e. all lines start with ">". Not sure what's causing this

This is intended behavior. You can configure Append quote (>) to selection as README.

  1. nested lists seem to be a problem (i.e. they're just treated as one giant list). not sure how well markdown handles such a case though, never had to deal with nested lists in markdown

I'm not sure what you got and what is expected. Please open a new issue according to the ISSUE_TEMPLATE. Thanks.

@Korodny
Copy link
Author

Korodny commented Jan 11, 2019

The issue with escaped dots in headings is fixed in 0.7.0.

Sorry, about the 'Append quote' configuration option - missed that. Is this enabled by default? I can't remember activating it (I did fool around a bit though, so it's entirely possible). If it is, I'd open a new issue about it ;-)

@0x6b
Copy link
Owner

0x6b commented Jan 14, 2019

  • I did nothing for esapes in headings. Please watch (and comment on) escaping Markdown characters #21 going forward. Note that I won't address this in short term as it needs some time (contribution welcome!)
  • The add-on appends quote by default. You don't have to open an issue as you can set via preference as you wish.

@Korodny
Copy link
Author

Korodny commented Jan 14, 2019

Well, I question the decision to make "append quote" the default ;) It's nice to have as an option, but why make it default?

@0x6b
Copy link
Owner

0x6b commented Jan 14, 2019

I got your point. It's by default as copied text is literally a quote for me. I won't surprise existing users by changing default setting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants