Skip to content

Commit 8a44005

Browse files
authored
Merge pull request #158 from Financial-Times/fix/UPPSF-6855-remove-title-attribute-from-find-out-more-link
Removed title from FindOutMoreLink
2 parents 0afdb14 + 798feca commit 8a44005

2 files changed

Lines changed: 2 additions & 4 deletions

File tree

content_tree.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1347,7 +1347,6 @@ func (n *Link) AppendChild(child Node) error {
13471347
type FindOutMoreLink struct {
13481348
Type string `json:"type"`
13491349
Children []*FindOutMoreLinkChild `json:"children"`
1350-
Title string `json:"title"`
13511350
URL string `json:"url"`
13521351
}
13531352

libraries/from-bodyxml/go/html_transformers.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,6 @@ var defaultTransformers = map[string]transformer{
158158
if attr(a, "data-anchor-style") == "onward-journey" {
159159
return &contenttree.FindOutMoreLink{
160160
Type: contenttree.FindOutMoreLinkType,
161-
Title: attr(a, "title"),
162161
URL: attr(a, "href"),
163162
Children: []*contenttree.FindOutMoreLinkChild{},
164163
}
@@ -505,8 +504,8 @@ func transformRecommended(r *etree.Element) contenttree.Node {
505504
}
506505

507506
func optionalBoolAttr(el *etree.Element, name string) *bool {
508-
if attr := el.SelectAttr(name); attr != nil {
509-
v := attr.Value == "true"
507+
if attribute := el.SelectAttr(name); attribute != nil {
508+
v := attribute.Value == "true"
510509
return &v
511510
}
512511
return nil

0 commit comments

Comments
 (0)