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

Editing "hidden" URL block causes adjacent blocks to be revealed #209

Closed
paxperscientiam opened this Issue Jun 21, 2017 · 3 comments

Comments

Projects
None yet
2 participants
@paxperscientiam

paxperscientiam commented Jun 21, 2017

Here's an interesting bug:

Consider a buffer with this text:

[site1](http://site1.com)
[site2](http://site2.com)
[site3](http://site3.com)

Given the above content and given markdown-mode is configured such that markdown-hide-urls is set to true, removing the closing parenthesis on the first block will cause said block and all subsequent blocks to "open". That is, the URLs will no longer be hidden for blocks that otherwise should be.

This appears to be the case regardless of what other content is on the lines.

@paxperscientiam paxperscientiam changed the title from Editing "masked" URL block causes adjacent blocks to be revealed to Editing "hidden" URL block causes adjacent blocks to be revealed Jun 21, 2017

@jrblevin

This comment has been minimized.

Show comment
Hide comment
@jrblevin

jrblevin Jun 21, 2017

Owner

Interesting. It's a question of how to parse this:

[site1](http://site1.com
[site2](http://site2.com)
[site3](http://site3.com)

If you run it through the Markdown dingus, for example, you get a link with text site1 and URL http://site1.com [site2](http://site2.com. So, the current behavior is probably better than the alternative of gobbling up and hiding the second link automatically. That being said, other implementations will keep the last two links intact, which is perhaps what markdown-mode should do for editing purposes.

Owner

jrblevin commented Jun 21, 2017

Interesting. It's a question of how to parse this:

[site1](http://site1.com
[site2](http://site2.com)
[site3](http://site3.com)

If you run it through the Markdown dingus, for example, you get a link with text site1 and URL http://site1.com [site2](http://site2.com. So, the current behavior is probably better than the alternative of gobbling up and hiding the second link automatically. That being said, other implementations will keep the last two links intact, which is perhaps what markdown-mode should do for editing purposes.

@jrblevin jrblevin added the bug label Jun 21, 2017

@jrblevin

This comment has been minimized.

Show comment
Hide comment
@jrblevin

jrblevin Jun 21, 2017

Owner

Well, this part is a bug no question. When the broken link is present, I'm getting a font-lock error:

Error during redisplay: (jit-lock-function 527) signaled (wrong-type-argument number-or-marker-p nil)
Owner

jrblevin commented Jun 21, 2017

Well, this part is a bug no question. When the broken link is present, I'm getting a font-lock error:

Error during redisplay: (jit-lock-function 527) signaled (wrong-type-argument number-or-marker-p nil)

@jrblevin jrblevin closed this in eb8cc19 Jun 21, 2017

@paxperscientiam

This comment has been minimized.

Show comment
Hide comment
@paxperscientiam

paxperscientiam Jun 21, 2017

I can confirm that this fix works on my end 👍 💯

paxperscientiam commented Jun 21, 2017

I can confirm that this fix works on my end 👍 💯

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment