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

Parenthesis in title change to underscores when using "Copy Markdown Link" #2085

Closed
jimfarrand opened this issue Nov 13, 2019 · 3 comments · Fixed by #2456
Closed

Parenthesis in title change to underscores when using "Copy Markdown Link" #2085

jimfarrand opened this issue Nov 13, 2019 · 3 comments · Fixed by #2456
Labels
bug It's a bug

Comments

@jimfarrand
Copy link

Environment

Joplin version: Joplin 1.0.174 (prod, darwin) Revision: 0ca96ee (HEAD)
Platform: macOS
OS specifcs: High Sierra 10.12.6

Steps To Reproduce

  1. Create a note, with parenthesis in the title. For example: This (is) a test
  2. Right click on the note and select: Copy Markdown Link
  3. Right click in the editor pane, and select: Paste

Link is pasted, but parenthesis are replaced by underscores. Eg:

[This _is_ a test](:/b761b196bb7e4367993b5bf7e6a66e50)

This feels like it might have been implemented deliberately, but it is not obvious why - parenthesis seem to work just fine inside links. If I manually correct the content to what I expect, it is displayed correctly and works correctly, so the change seems to be a bit purposeless.

If someone is relying on this behaviour, maybe there could be an option to switch it off?

Describe what you expected to happen:

Link is pasted with correct title:

[This (is) a test](:/b761b196bb7e4367993b5bf7e6a66e50)

Logfile

@jimfarrand jimfarrand added the bug It's a bug label Nov 13, 2019
@laurent22
Copy link
Owner

Good furst issue: Code that escapes title should be changed to allow parentheses.

@Runo-saduwa
Copy link
Contributor

Can this issue be assigned to me or is it solved?

@tessus
Copy link
Collaborator

tessus commented Feb 7, 2020

@Runo-saduwa sorry, I have just fixed this, because I didn't see your comment.

tessus added a commit to tessus/joplin that referenced this issue Feb 7, 2020
Previously a title with brackets was escaped incorrectly. The brackets were replaced by underscores.

The following title `title [square] (round)` looked like this:

[title _square_ _round_](:/c54794f53e5e4b1aa558699e255d5f95)

Now it looks like this:

[title \[square\] (round)](:/c54794f53e5e4b1aa558699e255d5f95)

fixes laurent22#2085
laurent22 pushed a commit that referenced this issue Feb 7, 2020
…rkdown link (#2456)

Previously a title with brackets was escaped incorrectly. The brackets were replaced by underscores.

The following title `title [square] (round)` looked like this:

[title _square_ _round_](:/c54794f53e5e4b1aa558699e255d5f95)

Now it looks like this:

[title \[square\] (round)](:/c54794f53e5e4b1aa558699e255d5f95)

fixes #2085
@lock lock bot locked and limited conversation to collaborators Feb 15, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug It's a bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants