Skip to content

Commit dcd5548

Browse files
committed
use ensureHtmlElements instead of regex check
1 parent 9a621d4 commit dcd5548

File tree

5 files changed

+15
-10
lines changed

5 files changed

+15
-10
lines changed

tests/docs/smoke-all/2024/05/06/9524/about/file.qmd

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@ title: "Untitled"
33
_quarto:
44
tests:
55
html:
6-
ensureFileRegexMatches:
7-
- ['<link rel="canonical" href="https://index.html.com/about/file.html">']
6+
ensureHtmlElements:
7+
- ['link[rel="canonical"][href="https://index.html.com/about/file.html"]']
8+
- []
89
---
910

1011
A non `index` file at the root of a subdirectory.

tests/docs/smoke-all/2024/05/06/9524/about/index.qmd

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@ title: "About"
33
_quarto:
44
tests:
55
html:
6-
ensureFileRegexMatches:
7-
- ['<link rel="canonical" href="https://index.html.com/about/">']
6+
ensureHtmlElements:
7+
- ['link[rel="canonical"][href="https://index.html.com/about/"]']
8+
- []
89
---
910

1011
About this site

tests/docs/smoke-all/2024/05/06/9524/about/test/something.qmd

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@ title: "Untitled"
33
_quarto:
44
tests:
55
html:
6-
ensureFileRegexMatches:
7-
- ['<link rel="canonical" href="https://index.html.com/about/test/something.html">']
6+
ensureHtmlElements:
7+
- ['link[rel="canonical"][href="https://index.html.com/about/test/something.html"]']
8+
- []
89
---
910

1011
Another file inside a nested directory.

tests/docs/smoke-all/2024/05/06/9524/index.qmd

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@ title: "Quarto 9524"
33
_quarto:
44
tests:
55
html:
6-
ensureFileRegexMatches:
7-
- ['<link rel="canonical" href="https://index.html.com/">']
6+
ensureHtmlElements:
7+
- ['link[rel="canonical"][href="https://index.html.com/"]']
8+
- []
89
---
910

1011
This is a Quarto website.

tests/docs/smoke-all/2024/05/06/9524/root-page.index.qmd

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@ title: root page
33
_quarto:
44
tests:
55
html:
6-
ensureFileRegexMatches:
7-
- ['<link rel="canonical" href="https://index.html.com/root-page.index.html">']
6+
ensureHtmlElements:
7+
- ['link[rel="canonical"][href="https://index.html.com/root-page.index.html"]']
8+
- []
89
---
910

1011
Root page with "index." pattern.

0 commit comments

Comments
 (0)