Repository: platers/obsidian-linter (ts)

Issue:
Bug: Quotes are formatted in markdown links
- [x] I have verified that I am on the latest version of the Linter

## Describe the Bug

Links in the format `[link](test.it 'Test title')` become `[link](test.it ‘Test title’)` if `Enable Single Quote Style` is on and Single `Quote Style` set to `‘’`.

## How to Reproduce

Example to reproduce issue with

``` markdown
[link](https://test.it 'Test title')
```

## Expected Behavior

Single or double quotes used in Markdown links to set the link title should be kept `''` and `""`.

Expected output if applicable:

``` markdown
[link](https://test.it 'Test title')
```

## Device

- [x] Desktop
- [ ] Mobile

Pull request description:
Make Sure `Quote Styles` Does Not Affect Markdown or Wiki Links
Fixes #929 

Changes Made:
- Ignored markdown and wiki links for `Quote Styles`
- Added a test for the scenario in question

Patch:
diff --git a/src/rules/quote-style.ts b/src/rules/quote-style.ts
index 957a3c7..e620d81 100644
--- a/src/rules/quote-style.ts
+++ b/src/rules/quote-style.ts
@@ -29,7 +29,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.inlineCode, 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.link, IgnoreTypes.wikiLink, IgnoreTypes.templaterCommand],
     });
   }
   get OptionsClass(): new () => QuoteStyleOptions {


Test patch:
diff --git a/__tests__/quote-style.test.ts b/__tests__/quote-style.test.ts
index 61e6b2c..69ca87a 100644
--- a/__tests__/quote-style.test.ts
+++ b/__tests__/quote-style.test.ts
@@ -111,5 +111,17 @@ ruleTest({
         doubleQuoteStyle: DoubleQuoteStyles.SmartQuote,
       },
     },
+    { // accounts for https://github.com/platers/obsidian-linter/issues/929
+      testName: 'Make sure quotes in markdown links get ignored',
+      before: dedent`
+        [link](https://test.it 'Test title')
+      `,
+      after: dedent`
+        [link](https://test.it 'Test title')
+      `,
+      options: {
+        singleQuoteStyle: SingleQuoteStyles.SmartQuote,
+      },
+    },
   ],
 });