Repository: platers/obsidian-linter (ts)

Issue:
Bug: No Bare URLs Affects HTML
❶ no use linter 
❷ use linter optimization
![image](https://github.com/platers/obsidian-linter/assets/29135984/72cf7cb3-87c6-4eef-9e42-2e21f47d984a)

Pull request description:
Updated `No Bare URLs` to Ignore html Elements
Fixes #777 

Changes Made:
- Added a test for the scenario in question
- Ignored html for `No Bare URLs`

Patch:
diff --git a/src/rules/no-bare-urls.ts b/src/rules/no-bare-urls.ts
index d17c013..9d1c64f 100644
--- a/src/rules/no-bare-urls.ts
+++ b/src/rules/no-bare-urls.ts
@@ -16,7 +16,7 @@ export default class NoBareUrls extends RuleBuilder<NoBareUrlsOptions> {
       nameKey: 'rules.no-bare-urls.name',
       descriptionKey: 'rules.no-bare-urls.description',
       type: RuleType.CONTENT,
-      ruleIgnoreTypes: [IgnoreTypes.code, IgnoreTypes.math, IgnoreTypes.yaml, IgnoreTypes.link, IgnoreTypes.wikiLink, IgnoreTypes.tag, IgnoreTypes.image, IgnoreTypes.inlineCode, IgnoreTypes.anchorTag],
+      ruleIgnoreTypes: [IgnoreTypes.code, IgnoreTypes.math, IgnoreTypes.yaml, IgnoreTypes.link, IgnoreTypes.wikiLink, IgnoreTypes.tag, IgnoreTypes.image, IgnoreTypes.inlineCode, IgnoreTypes.anchorTag, IgnoreTypes.html],
     });
   }
   get OptionsClass(): new () => NoBareUrlsOptions {


Test patch:
diff --git a/__tests__/no-bare-urls.test.ts b/__tests__/no-bare-urls.test.ts
index 40e9d05..6405eba 100644
--- a/__tests__/no-bare-urls.test.ts
+++ b/__tests__/no-bare-urls.test.ts
@@ -47,7 +47,7 @@ ruleTest({
         \`http --headers --follow --all https://google.com\`
       `,
     },
-    {// https://github.com/platers/obsidian-linter/issues/588
+    {// accounts for https://github.com/platers/obsidian-linter/issues/588
       testName: 'Make sure that anchor tags are not affected by the rule',
       before: dedent`
         <a href="https://www.google.com" class="tc-tiddlylink-external" rel="noopener noreferrer" target="_blank">https://www.google.com</a>
@@ -56,5 +56,16 @@ ruleTest({
         <a href="https://www.google.com" class="tc-tiddlylink-external" rel="noopener noreferrer" target="_blank">https://www.google.com</a>
       `,
     },
+    {// accounts for https://github.com/platers/obsidian-linter/issues/777
+      testName: 'Make sure that iframe tags are not affected by the rule when a space is present in the src attribute of the tag',
+      before: dedent`
+        > [!note]  [Google](https://www.google.com)
+        > <iframe width="100%" height="600" src=" https://www.google.com "></iframe>
+      `,
+      after: dedent`
+        > [!note]  [Google](https://www.google.com)
+        > <iframe width="100%" height="600" src=" https://www.google.com "></iframe>
+      `,
+    },
   ],
 });