jakewvincent / mkdnflow.nvim

Fluent navigation and management of markdown notebooks
GNU General Public License v3.0
654 stars 37 forks source link

Bug: Commit f1e968c broke link following for when you have 2 links on one line #185

Closed peppermilldetective closed 6 months ago

peppermilldetective commented 6 months ago

Just encountered this issue, but a priorly fixed bug (#120) was unfixed with commit f1e968c pushed on the 7th. This can be proven by pinning mkdnflow to the prior commit (db96f58) and seeing that the issue does not exist, then updating and seeing that the issue exists.

From what I can tell, it should be reproducable with a default setup for mkdnflow.

peppermilldetective commented 6 months ago

Suggestion: try '%]%((.*?)%)' for the regex matching. I can't test at the moment but the issue is that the regex is too greedy, and adding the ? should stop that.

jakewvincent commented 6 months ago

Thanks for pointing this out, @peppermilldetective! I recently made it greedy because links to URLs containing parentheses weren't getting fully matched, but I see that that solution was a bit too powerful. I think your suggestion is equivalent to what it was prior to this regression -- '%]%((.-)%)'. I need to figure out an in-between that will work for both these cases.

jakewvincent commented 6 months ago

@peppermilldetective I think this is fixed now. Please give it a try after pulling the latest updates.

peppermilldetective commented 6 months ago

@jakewvincent Sorry for the late reply, but it does seem like it is fixed now! Thanks!

jakewvincent commented 6 months ago

Great! Going ahead and closing this.