Skip to content

Commit

Permalink
Add test case for link to hash inside <pre> tag
Browse files Browse the repository at this point in the history
  • Loading branch information
wjdp committed Apr 25, 2021
1 parent 4d3efc5 commit b9e6728
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
6 changes: 6 additions & 0 deletions htmltest/check-link_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,12 @@ func TestAnchorHashBrokenIgnore(t *testing.T) {
tExpectIssueCount(t, hT2, 0)
}

func TestAnchorHashInPre163(t *testing.T) {
// passes for valid self hash
hT := tTestFile("fixtures/links/hash-in-pre-163.html")
tExpectIssueCount(t, hT, 0)
}

func TestAnchorDirectoryRootResolve(t *testing.T) {
// properly resolves implicit /index.html in link paths
hT := tTestFile("fixtures/links/linkToFolder.html")
Expand Down
7 changes: 7 additions & 0 deletions htmltest/fixtures/links/hash-in-pre-163.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<!DOCTYPE html>

<pre><span id="A">1</span></pre>
<a href="#A">1</a>

<span id="B">2</span>
<a href="#B">2</a>

0 comments on commit b9e6728

Please sign in to comment.