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

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

Closed
paxperscientiam opened this issue Jun 21, 2017 · 3 comments
Closed
Labels

Comments

@paxperscientiam
Copy link

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 Editing "masked" URL block causes adjacent blocks to be revealed Editing "hidden" URL block causes adjacent blocks to be revealed Jun 21, 2017
@jrblevin
Copy link
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
Copy link
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)

@paxperscientiam
Copy link
Author

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
Labels
Projects
None yet
Development

No branches or pull requests

2 participants