diff --git a/README.md b/README.md index 527bf8d..ff9c0fd 100644 --- a/README.md +++ b/README.md @@ -15,20 +15,65 @@ USAGE Example of parsing a string containing HTML: - include ( + package main + + import ( + "github.com/iand/microdata" "net/url" "strings" ) - html = `
My name is Elizabeth.
-My name is Elizabeth.
+Name: Amanda
@@ -462,7 +462,6 @@ func TestParseEmbeddedItem(t *testing.T) { t.Errorf("Expecting 1 item but got %d", len(data.Items)) } - if data.Items[0].Properties["name"][0].(string) != "Amanda" { t.Errorf("Property value 'Amanda' not found for 'name'") } @@ -490,7 +489,6 @@ func TestParseEmbeddedItemWithItemRef(t *testing.T) { t.Errorf("Expecting 1 item but got %d", len(data.Items)) } - if data.Items[0].Properties["name"][0].(string) != "Amanda" { t.Errorf("Property value 'Amanda' not found for 'name'") } @@ -502,8 +500,6 @@ func TestParseEmbeddedItemWithItemRef(t *testing.T) { } } - - func TestParseRelativeURL(t *testing.T) { html := `