mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-28 22:19:59 +02:00
@@ -50,12 +50,11 @@ func (pos Position) IsValid() bool {
|
||||
var positionStringFormatfunc func(p Position) string
|
||||
|
||||
func createPositionStringFormatter(formatStr string) func(p Position) string {
|
||||
|
||||
if formatStr == "" {
|
||||
formatStr = "\":file::line::col\""
|
||||
}
|
||||
|
||||
var identifiers = []string{":file", ":line", ":col"}
|
||||
identifiers := []string{":file", ":line", ":col"}
|
||||
var identifiersFound []string
|
||||
|
||||
for i := range formatStr {
|
||||
|
@@ -29,5 +29,4 @@ func TestPositionStringFormatter(t *testing.T) {
|
||||
c.Assert(createPositionStringFormatter("好::col")(pos), qt.Equals, "好:13")
|
||||
c.Assert(createPositionStringFormatter("")(pos), qt.Equals, "\"/my/file.txt:12:13\"")
|
||||
c.Assert(pos.String(), qt.Equals, "\"/my/file.txt:12:13\"")
|
||||
|
||||
}
|
||||
|
@@ -25,5 +25,4 @@ func TestRemoveAccents(t *testing.T) {
|
||||
c.Assert(string(RemoveAccents([]byte("Resumé"))), qt.Equals, "Resume")
|
||||
c.Assert(string(RemoveAccents([]byte("Hugo Rocks!"))), qt.Equals, "Hugo Rocks!")
|
||||
c.Assert(string(RemoveAccentsString("Resumé")), qt.Equals, "Resume")
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user