Skip to content
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

Handle Rule Conflicts #1192

Merged
merged 6 commits into from
Oct 14, 2024
Merged

Handle Rule Conflicts #1192

merged 6 commits into from
Oct 14, 2024

Conversation

pjkaufman
Copy link
Collaborator

@pjkaufman pjkaufman commented Oct 14, 2024

Relates to #1187
Fixes #911
Fixes #856

Some rules do not play well together. So they need to not be enabled at the same time. Thus logic has been added so that when one of these scenarios happens the other rule is disabled.

If a user enables Insert File Name, and Header Increment Starts at H2 is enabled it will ask if the user wants Starts at H2 to be turned off or if they want to cancel their action and vice versa.

If a user enables Paragraph Blank Lines and Line Break Between Lines with Content is enabled, it will ask if the user wants Line Break Between Lines with Content to be turned off or if they want to cancel their action and vice versa.

On startup, there will be changes that disable Header Increment Starts at H2 and Paragraph Blank Lines if their conflicting rule is enabled. A notice will explain the situation and the user can go to the settings to make a change if they would like.

@pjkaufman pjkaufman added the obsidian Obsidian specific syntax issue or feature label Oct 14, 2024
@pjkaufman pjkaufman self-assigned this Oct 14, 2024
@pjkaufman pjkaufman added the rule conflict 2 rules are conflicting with each other which is causing the reported behavior label Oct 14, 2024
@pjkaufman pjkaufman marked this pull request as ready for review October 14, 2024 02:02
@pjkaufman pjkaufman merged commit 145463a into platers:master Oct 14, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
obsidian Obsidian specific syntax issue or feature rule conflict 2 rules are conflicting with each other which is causing the reported behavior
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: File Name Heading inserted numerous times FR: Add check to avoid recursive rule combinations
1 participant