Skip to content

Commit

Permalink
move URL resolution to the end of u- processing
Browse files Browse the repository at this point in the history
  • Loading branch information
willnorris committed Dec 24, 2018
1 parent 619e534 commit 0f19fbc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 3 additions & 3 deletions microformats.go
Original file line number Diff line number Diff line change
Expand Up @@ -388,9 +388,6 @@ func (p *parser) walk(node *html.Node) {
if value == nil && isAtom(node, atom.Video) {
value = getAttrPtr(node, "poster")
}
if value != nil {
*value = expandURL(*value, p.base)
}
if value == nil {
value = getValueClassPattern(node)
}
Expand All @@ -404,6 +401,9 @@ func (p *parser) walk(node *html.Node) {
value = new(string)
*value = strings.TrimSpace(getTextContent(node, nil))
}
if value != nil {
*value = expandURL(*value, p.base)
}
if curItem != nil && p.curItem != nil {
embedValue = getFirstPropValue(curItem, "url")
}
Expand Down
4 changes: 3 additions & 1 deletion testsuite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@ import (
)

// skip the tests which we don't pass yet
var skipTests = []string{}
var skipTests = []string{
"microformats-v1/hcard/email", // https://github.com/microformats/tests/pull/108
}

func TestSuite(t *testing.T) {
for _, version := range []string{"microformats-mixed", "microformats-v1", "microformats-v2"} {
Expand Down

0 comments on commit 0f19fbc

Please sign in to comment.