Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
revelaction committed Oct 26, 2023
1 parent e6b0b4c commit 7626f7d
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions export.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ const (

mankidownTag = "mankidown"

// Anki Import UI wants each note type field to be non empty. We allow
// empty fields and add emptyComment in order to fill with something
emptyComment = "<!---->"
// Anki Import UI wants each note type field to be non empty. We allow
// empty fields and add emptyComment in order to fill with something
emptyComment = "<!---->"
)

type Config struct {
Expand Down Expand Up @@ -85,11 +85,11 @@ func (ex *Exporter) Export(notes *Notes) error {
fields = append(fields, buildTagsField(note))

for _, field := range note.Fields() {
fields = append(fields, buildFieldAsLine(field.Html))
}
fields = append(fields, buildFieldAsLine(field.Html))
}

noteline := strings.Join(fields, separatorChar)
fmt.Fprintf(out, "%s\n", noteline)
noteline := strings.Join(fields, separatorChar)
fmt.Fprintf(out, "%s\n", noteline)

}

Expand Down Expand Up @@ -176,9 +176,9 @@ func buildFieldAsLine(html string) string {
// 3) delete <br> between tags
fieldLine = strings.Replace(fieldLine, "><br><", "><", -1)

if fieldLine == "" {
return emptyComment
}
if fieldLine == "" {
return emptyComment
}

return fieldLine
}

0 comments on commit 7626f7d

Please sign in to comment.