forked from ukamnya/microdata_mirror
		
	Added parsing of itemid
This commit is contained in:
		
							parent
							
								
									93774ea600
								
							
						
					
					
						commit
						a58ae8f1fe
					
				| @ -15,6 +15,7 @@ type PropertyMap map[string]ValueList | ||||
| type Item struct { | ||||
| 	properties PropertyMap | ||||
| 	types []string | ||||
| 	id string | ||||
| } | ||||
| 
 | ||||
| func NewItem() *Item { | ||||
| @ -77,7 +78,10 @@ func (self *Parser) scanForItem(node *h5.Node) { | ||||
| 					item.types = append(item.types, itemtype) | ||||
| 				} | ||||
| 			} | ||||
| 
 | ||||
| 			// itemid only valid when itemscope and itemtype are both present | ||||
| 			if itemid, exists := getAttr("itemid", node); exists { | ||||
| 				item.id = strings.TrimSpace(itemid) | ||||
| 			} | ||||
| 			 | ||||
| 		}  | ||||
| 
 | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user