Skip to content

Commit

Permalink
jats: trim title space
Browse files Browse the repository at this point in the history
  • Loading branch information
miku committed Mar 31, 2015
1 parent a509fcc commit 0827192
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions jats/article.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"errors"
"fmt"
"strconv"
"strings"
"time"

"github.com/kapsteur/franco"
Expand Down Expand Up @@ -257,12 +258,12 @@ func (article *Article) CombinedTitle() string {
group := article.Front.Article.TitleGroup
if group.Title.Value != "" {
if group.Subtitle.Value != "" {
return fmt.Sprintf("%s : %s", group.Title.Value, group.Subtitle.Value)
return strings.TrimSpace(fmt.Sprintf("%s : %s", group.Title.Value, group.Subtitle.Value))
}
return group.Title.Value
return strings.TrimSpace(group.Title.Value)
}
if group.Subtitle.Value != "" {
return group.Subtitle.Value
return strings.TrimSpace(group.Subtitle.Value)
}
return ""
}
Expand Down

0 comments on commit 0827192

Please sign in to comment.