fix: no newline at end of file
parent
afcee321fa
commit
176e35a16e
|
@ -12,4 +12,4 @@
|
||||||
|
|
||||||
### Others
|
### Others
|
||||||
|
|
||||||
- chore: new build
|
- chore: new build
|
||||||
|
|
|
@ -22,4 +22,4 @@
|
||||||
|
|
||||||
- chore(gitlab): release on gitlab
|
- chore(gitlab): release on gitlab
|
||||||
|
|
||||||
- unleash the dragon
|
- unleash the dragon
|
||||||
|
|
|
@ -4,10 +4,12 @@ import "strings"
|
||||||
|
|
||||||
func Generate(bases []Node) string {
|
func Generate(bases []Node) string {
|
||||||
lines := make([]string, len(bases))
|
lines := make([]string, len(bases))
|
||||||
|
|
||||||
for i, base := range bases {
|
for i, base := range bases {
|
||||||
lines[i] = base.String()
|
lines[i] = base.String()
|
||||||
}
|
}
|
||||||
|
|
||||||
return strings.Join(lines, string(NewlineToken)+string(NewlineToken))
|
result := strings.Join(lines, string(NewlineToken)+string(NewlineToken))
|
||||||
|
// Fix no newline at end of file
|
||||||
|
result += string(NewlineToken)
|
||||||
|
return result
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,7 +26,7 @@ func TestGenerate(t *testing.T) {
|
||||||
text: "item 2",
|
text: "item 2",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
want: "# header\n\n- item 1\n\n- item 2",
|
want: "# header\n\n- item 1\n\n- item 2\n",
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue