Custom Lint Commands
- Install the QuickAdd plugin
- Go ahead and go to the settings for QuickAdd and select "Manage Macros"
- You should see a modal popup. In that modal, make sure to type in a macro name and add the macro.
- Once you have finished all changes to your macro that you would like, go ahead and exit out of configure macro modal and the macro manager modal.
- Then go ahead and select macro for the choice type and type in the name of the macro you just created (you may get suggestions or you may have to remember the name and type it in completely). Then add select "Add Choice".
- Once the choice has been added, go ahead and click the lightning bolt icon which is the option to add a command for a choice.
- Now you just need to search up this newly created command in the custom command settings for Obsidian Linter.
Now the next time you run the Linter, the custom lint commands should run.
Custom Regex Replacements
These are rules that run before the YAML timestamp rule, but after most of the other rules. These rules allow you to specify the regex to find, the flags to use with that regex, and the value to replace it with. You may specify whitespace as the find and replace values, but please be careful as this can make a lot of unwanted changes if you are not careful. These rules can be useful in swapping out certain tags, words, and formatting for others if you know what you are doing in regex.
Here is an online playground that you can test out regex at. It can let you know when regex is slow and you can use it to test if the text you want to replace is actually being selected by the find and flags portion of the regex.
Here is an explanation on what each flag means. Feel free to use them as needed. The default ones added are
g (global) and
Regex lookbehinds can break Linter functionality
Regex lookbehinds do not work on iOS mobile and using them will cause linting to fail. So please DO NOT use them for iOS mobile.