-
-
Notifications
You must be signed in to change notification settings - Fork 40
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
[Bug]: Jekyll Regex stopped working #377
Comments
For extra context, here's what Jekyll expects as links. |
Valid critics is okay. But maintening a plugin on this size with a lot of feature is time consuming and I works alone. The lack of a valid and simple Obsidian tests is also a problem, as I don't have the time to create mock. You can remade a PR with updated tests if you want, as the plugin is a FOSS. Remember that I work totally alone on this project. |
PS: It is possible to have a regex101 testing link? Thanks! |
Thanks, it worked. Is there a way of knowing when changes like this are coming? It's really hard to debug. |
Hmm… Maybe I should add some notification in Obsidian when this type of change appear? I don't like it myself (I think it's disruptive). |
Issue validation
Command used
Upload single current active note
Plugin version
7.5.2
Describe the bug
The short description is that regex is not working anymore. Jekyll URL links need to look like
[Text]({% link something %})
, but the links are just pure markdown ([Text](the-url)
), which breaks links.The long description is that this keeps breaking every few months. Every 6 months or so, there's some change to the code that breaks the replacement. I then need to go into the console and debug
findAndReplaceText
, which is time consuming.To address the problem of code changes breaking features — regex more specifically , I introduced tests to the repository in this pull request. It was later deleted, which is hard to understand. Lack of tests is like driving a car without brakes. I tried to contribute to make the plugin more stable but it looks like that wasn't welcome.
Without tests, regex will just keep breaking and it makes this plugin unusable. I barely use it due to these problems.
How to reproduce ?
/(?<!\
)[(.?)]((?!(http|/image|obsidian/image))(./)(.+?)(.md))/`[$1]({% link obsidian/$4.md %})
The expected link will look like
[Text]({% link something %})
. I wrote about it in this post.ps. I surrounded the regex with
/
, whereas the post above doesn't include it because, again, the plugin keeps changing and breaking behavior every once in a while.Minimal Reproducible Example
Configuration
Relevant log output
OS
MacOS
Anything else?
This line shows what the plugin is outputting. It is effectively bypassing the regex: https://github.com/kurko/blog/pull/101/files#diff-d4abb3176d193679c7724481e08393a8943156ac98663bd289f488ec52a06e86R30
Obsidian information
The text was updated successfully, but these errors were encountered: