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

Escape characters are being included in titles #34

Closed
patkujawa-wf opened this issue Jan 13, 2016 · 11 comments
Closed

Escape characters are being included in titles #34

patkujawa-wf opened this issue Jan 13, 2016 · 11 comments

Comments

@patkujawa-wf
Copy link

I think this is new with Version: 1.1.0, Updated: January 11, 2016. When you use it on a page with underscores or brackets (probably other chars), the backslash appears in the title when it shouldn't, e.g. a page with the title [a_b] is being copied as [\[a\_b\]](http://example.com)

@patkujawa-wf
Copy link
Author

For example, JIRA urls often have brackets:
https://jira.atlassian.com/browse/BON-42457 gets copied as [\[BON-42457\] The button is not working - Atlassian JIRA](https://jira.atlassian.com/browse/BON-42457). EDIT: Link is broken, but https://jira.atlassian.com/projects/BON/issues/BON-2177?filter=allopenissues should get a similar page.

@patkujawa-wf
Copy link
Author

@patkujawa-wf
Copy link
Author

Ah, so that was intentional. Bummer. Github always seemed to be ok with brackets and underscores, even if stackoverflow wasn't (for instance, in #31 the example is [M.O.O.N. - 'Hydrogen' [Hotline Miami Soundtrack] - YouTube](https://www.youtube.com/watch?v=SNE2oCZH_4k) , but github handles it just fine: M.O.O.N. - 'Hydrogen' [Hotline Miami Soundtrack] - YouTube).

Can you make this a setting that we can disable? Typically, I use this extension just to get the page title so the link makes sense when I paste it in hipchat or other non-markdown textboxes, so it isn't only useful for markdown :)

@patkujawa-wf
Copy link
Author

Also, http://daringfireball.net/projects/markdown/dingus handles unescaped stuff just fine, e.g. [[_]](http://daringfireball.net/projects/markdown/dingus)

@yorkxin
Copy link
Owner

yorkxin commented Jan 14, 2016

Thanks for your suggestion.

You're right, most Markdown processors handle this with no problem. I understand that it could be a little bit annoying when there is no escape problem in the text, and in most cases, the text should be fine.

The only case I found so far is incomplete bracket like [[test](http://example.com), which mostly don't happen.

I will think about the need of this feature and put my thoughts here.

@yorkxin
Copy link
Owner

yorkxin commented Jan 14, 2016

The only case that mentioned in #31 is on https://chat.stackoverflow.com

screen shot 2016-01-14 at 14 31 12

IMHO this doesn't make it necessary to escape all the unescaped chars.

@wilx
Copy link

wilx commented Jan 14, 2016

I think this is not solvable with one solution working for all. Maybe an option to turn escaping on/off and keeping the default as off would work for most?

@yorkxin
Copy link
Owner

yorkxin commented Jan 26, 2016

Sorry for late response. I will add an option for this.

@yorkxin
Copy link
Owner

yorkxin commented Jan 26, 2016

Hey, I have made it an option. It is now disabled by default.

It may take some time for Chrome / Firefox web stores to distribute new versions worldwide, but should not be too long.

For Chrome: Go to "Extensions" page, find "Copy as Markdown" and click "options" to enable it.

For Firefox: Go to "Add Ons" page, find "Copy as Markdown" and click "Preferences".

Feel free to give me any suggestions :)

@wilx
Copy link

wilx commented Jan 26, 2016

Cool! 👍

@patkujawa-wf
Copy link
Author

Nice! Thanks, I really appreciate it :)
image

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

3 participants