Patterns limitations
On the command pallets, all the commands of generic patterns are limited to the first 20 patterns. The 21 pattern and below are not available. Even if I try searching the name of the pattern it does not work. Is there any way to have more patterns available?
Thank you for reaching out!
I haven't seen this behavior myself, so I especially appreciate you writing. Would you be willing to post / attach (or otherwise send) the contents of the plugin's data.json file for your patterns (<vault path>/.obsidian/obsidian-apply-patterns/data.json)? That could help me to diagnose the issue.
Actually, after some tests, I figured it is not actually limited to 20. But it leaves some of the bottom patterns out, in a somewhat random way. As my data.json has some personal information, I did this one in a Sandbox vault. As you'll see, the last 2 patterns are not shown in the commands. After my original post, I came up with a workaround, which is to add some random patterns at the end, so my last actual patterns show up. It's working fine, so it's no big deal.
@denizido, thank you very much for your time and help creating those example data! They really have helped me to debug.
I believe I've corrected the issue in v2.1.2-beta0, which I've released just now. Would you be willing to try that release and let me know whether it seems to be working correctly?
(The issue was that the plugin automatically filters Patterns that have either no rules, or rules where the from field is blank. There are two such rules in the example data you sent. The plugin was incorrectly processing the indexes of those filtered Patterns, such that the next pattern in the line would be filtered. It's a bug that I'm happy to be correcting now!)
Yes, it did solve it! Thank you very much! My bad, the issue was in my patterns after all.
If it's not asking too much, would you know if it's possible to change the text case? As I understand, the plugin uses javascrip flavor, which does not support \U or \L case conversion (https://www.regular-expressions.info/refreplacecase.html). But I was wondering if there is another way; or maybe if could become a feature in the future. The only way I can think is to create a very long pattern (A -> a) ... (Z -> z).
Sorry, I didn't mean to close this without a response! I'm glad to hear that this worked! Thank you for raising it!
If it's not asking too much, would you know if it's possible to change the text case?
I'll think more on this. Since it's not supported by the regex parser, I'd like to spend some additional time thinking through how I'd like to implement it. I will keep it in mind!