Skip to content

Releases: Alecell/auto-replacer

Frontmatter Config

17 Sep 04:56

Choose a tag to compare

💫 New Features

Rule Overrides in Frontmatter

You can now customize your Auto Replacer rules on a per-file basis using frontmatter. This gives you granular control without changing your global settings.

  • Disable a rule: Set a rule to false or use an empty array ([]) to completely disable it for the current note.
  • Specify custom patterns: Define a list of strings or regex patterns in an array for a specific rule. These new patterns will override the global ones.
  • Use templates: Special placeholders like {{mainRule}} allow you to include your original global rule within a list of new, custom patterns.

Advanced Rule Templating

We've introduced new templates to make your rules more powerful and flexible.

  • {{frontmatterString}}: Use this template in your rule's regex to dynamically match the exact strings you've defined in the frontmatter. This is perfect for creating complex formatting rules that avoid infinite loops.

Ignore Content Options

Don't want your rules to run in certain parts of a note? You can now configure each rule to ignore specific content types.

  • Ignore Frontmatter: Prevents rules from running in the YAML header.
  • Ignore Titles: Excludes all headings (H1-H6) from rule execution.
  • Ignore Code Blocks: Skips text inside backquote (```) and tilde (~~~) code blocks.

⚠️ Important Warnings & Best Practices

Avoid Overlapping Rules

The plugin does not handle overlapping rules gracefully. If one rule's search pattern matches a part of the text that another rule also targets, the outcome can be unpredictable and may cause unexpected text corruption.

  • Recommendation: To ensure stable and predictable results, create rules with distinct search patterns. If you need multiple transformations (e.g., bold and italics), create a single rule that handles both.

Use Quoted Templates in Frontmatter

When defining rules in your frontmatter, always wrap templates like {{mainRule}} in quotes (") to ensure they are interpreted as a string, not a YAML data type.


⚙️ Configuration Updates

The rule configuration page now includes a new section with checkboxes to enable the ignore options for each rule, giving you a clear visual overview of your settings.

Check Docs for further information!

Hotfix for ignored blocks

14 Sep 18:17

Choose a tag to compare

Previous blocks wasnt ignoring labelade blocks, now it supports it

v1.1

14 Sep 16:36

Choose a tag to compare

Add option to ignore some codeblocks such as blockquote blocks "```", tilde block "~~~" and frontmatter blocks "---".

It was done cause theres no way to ignore these much ignorable blocks solely with regex, so now we have a way to ignore them as options on the plugin.

Also added a option to ignore titles.


Addressed the #1 issue to have a smarter way to handle the replacement, before we just had a debounce for it, not it have a longer debounce and a instant handler for "end word characters" such as " ", "Enter", "," and so on.

v1

27 May 19:49

Choose a tag to compare

v1

First app release