@@ -137,7 +137,7 @@ func TestHTMLFormatter_Format(t *testing.T) {
137
137
wantErr : false ,
138
138
validate : func (f * HTMLFormatter , output string , t * testing.T ) {
139
139
expect := 2
140
- re := regexp .MustCompile (`<li><a href="\ #192\.168\.1\.(1|2 )">` )
140
+ re := regexp .MustCompile (`<li><a href="#192\.168\.1\.([12] )">` )
141
141
actual := len (re .FindAllString (output , - 1 ))
142
142
if expect != actual {
143
143
t .Fatalf ("Expected %d addresses in TOC, got %d" , expect , actual )
@@ -199,7 +199,7 @@ func TestHTMLFormatter_Format(t *testing.T) {
199
199
wantErr : false ,
200
200
validate : func (f * HTMLFormatter , output string , t * testing.T ) {
201
201
expect := 1
202
- re := regexp .MustCompile (`<li><a href="\ #192\.168\.1\.(1|2 )">` )
202
+ re := regexp .MustCompile (`<li><a href="#192\.168\.1\.([12] )">` )
203
203
actual := len (re .FindAllString (output , - 1 ))
204
204
if expect != actual {
205
205
t .Fatalf ("Expected %d addresses in TOC, got %d" , expect , actual )
@@ -261,7 +261,7 @@ func TestHTMLFormatter_Format(t *testing.T) {
261
261
wantErr : false ,
262
262
validate : func (f * HTMLFormatter , output string , t * testing.T ) {
263
263
expect := 2
264
- re := regexp .MustCompile (`<li><a href="\ #192\.168\.1\.(1|2 )">` )
264
+ re := regexp .MustCompile (`<li><a href="#192\.168\.1\.([12] )">` )
265
265
actual := len (re .FindAllString (output , - 1 ))
266
266
if expect != actual {
267
267
t .Fatalf ("Expected %d addresses in TOC, got %d" , expect , actual )
0 commit comments