File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -48,16 +48,16 @@ func findHeaders(r io.Reader) []Header {
4848}
4949
5050func getHxDepth (dataAtom atom.Atom ) HxDepth {
51- depths := []atom.Atom {
51+ hxAtoms := []atom.Atom {
5252 atom .H1 ,
5353 atom .H2 ,
5454 atom .H3 ,
5555 atom .H4 ,
5656 atom .H5 ,
5757 atom .H6 ,
5858 }
59- for depth , v := range depths {
60- if dataAtom == v {
59+ for depth , hxAtom := range hxAtoms {
60+ if dataAtom == hxAtom {
6161 return HxDepth (depth )
6262 }
6363 }
Original file line number Diff line number Diff line change @@ -94,6 +94,7 @@ func TestFindAttribute(t *testing.T) {
9494 assert .Equal (t , spaceGreeting , attr )
9595 })
9696 t .Run ("attribute does not exist" , func (t * testing.T ) {
97- t .Error ("IMPLEMENT ME!" )
97+ _ , ok := findAttribute (attrs , "" , "doesnotexist" )
98+ assert .False (t , ok )
9899 })
99100}
You can’t perform that action at this time.
0 commit comments