Repository: platers/obsidian-linter (ts)

Issue:
FR: Exclude quote rules from inline code (single backticks)
## Is Your Feature Request Related to a Problem? Please Describe.

I ran the linter across my vault and notices that it changes something like `` `'Test'` `` to `` `‘Test’` `` when smart quotes are enabled, but in this case it was referring to a string in code.

## Describe the Solution You'd Like

It would be great if there was an option to disable the option for inline code. There are a few other rules which also seem to be deactivated in code blocks but not in inline code (like removing spaces after punctuation) so it could make sense to make an option that is broader and affects more than one rule.

**Please include an example where applicable:**

```markdown
- `'string'`
```

```markdown
- `'string'`
```

## Describe Alternatives You've Considered

You could use a code block but for small snippets especially in the middle of a sentence inline code makes more sense so I ended up disabling the rules that negatively affected my inline code snippets.

Pull request:
Make `Quote Style` Ignore Inline Code
Fixes #826 

Changes Made:
- Added a test for ignoring inline code for quote style
- Added ignore type for inline code for quote style

Patch:
diff --git a/src/rules/quote-style.ts b/src/rules/quote-style.ts
index 5473d8b..c8e214b 100644
--- a/src/rules/quote-style.ts
+++ b/src/rules/quote-style.ts
@@ -211,7 +211,7 @@ export default class QuoteStyle extends RuleBuilder<QuoteStyleOptions> {
       nameKey: 'rules.quote-style.name',
       descriptionKey: 'rules.quote-style.description',
       type: RuleType.CONTENT,
-      ruleIgnoreTypes: [IgnoreTypes.code, IgnoreTypes.math, IgnoreTypes.yaml, IgnoreTypes.math, IgnoreTypes.inlineMath, IgnoreTypes.html, IgnoreTypes.templaterCommand],
+      ruleIgnoreTypes: [IgnoreTypes.code, IgnoreTypes.inlineCode, IgnoreTypes.math, IgnoreTypes.yaml, IgnoreTypes.math, IgnoreTypes.inlineMath, IgnoreTypes.html, IgnoreTypes.templaterCommand],
     });
   }
   get OptionsClass(): new () => QuoteStyleOptions {


Test patch:
diff --git a/__tests__/quote-style.test.ts b/__tests__/quote-style.test.ts
new file mode 100644
index 0000000..90d7616
--- /dev/null
+++ b/__tests__/quote-style.test.ts
@@ -0,0 +1,24 @@
+import QuoteStyle, {SingleQuoteStyles, DoubleQuoteStyles} from '../src/rules/quote-style';
+import dedent from 'ts-dedent';
+import {ruleTest} from './common';
+
+ruleTest({
+  RuleBuilderClass: QuoteStyle,
+  testCases: [
+    { // accounts for https://github.com/platers/obsidian-linter/issues/826
+      testName: 'Make sure inline code is unaffected',
+      before: dedent`
+        \`'Test'\`
+        \`"Test"\`
+      `,
+      after: dedent`
+        \`'Test'\`
+        \`"Test"\`
+      `,
+      options: {
+        singleQuoteStyle: SingleQuoteStyles.SmartQuote,
+        doubleQuoteStyle: DoubleQuoteStyles.SmartQuote,
+      },
+    },
+  ],
+});