vendor/golang.org/x/net/html/render.go
changeset 251 1c52a0eeb952
parent 242 2a9ec03fe5a1
child 256 6d9efbef00a9
equal deleted inserted replaced
250:c040f992052f 251:1c52a0eeb952
   132 					return err
   132 					return err
   133 				}
   133 				}
   134 			}
   134 			}
   135 		}
   135 		}
   136 		return w.WriteByte('>')
   136 		return w.WriteByte('>')
       
   137 	case RawNode:
       
   138 		_, err := w.WriteString(n.Data)
       
   139 		return err
   137 	default:
   140 	default:
   138 		return errors.New("html: unknown node type")
   141 		return errors.New("html: unknown node type")
   139 	}
   142 	}
   140 
   143 
   141 	// Render the <xxx> opening tag.
   144 	// Render the <xxx> opening tag.
   250 }
   253 }
   251 
   254 
   252 // Section 12.1.2, "Elements", gives this list of void elements. Void elements
   255 // Section 12.1.2, "Elements", gives this list of void elements. Void elements
   253 // are those that can't have any contents.
   256 // are those that can't have any contents.
   254 var voidElements = map[string]bool{
   257 var voidElements = map[string]bool{
   255 	"area":    true,
   258 	"area":   true,
   256 	"base":    true,
   259 	"base":   true,
   257 	"br":      true,
   260 	"br":     true,
   258 	"col":     true,
   261 	"col":    true,
   259 	"command": true,
   262 	"embed":  true,
   260 	"embed":   true,
   263 	"hr":     true,
   261 	"hr":      true,
   264 	"img":    true,
   262 	"img":     true,
   265 	"input":  true,
   263 	"input":   true,
   266 	"keygen": true,
   264 	"keygen":  true,
   267 	"link":   true,
   265 	"link":    true,
   268 	"meta":   true,
   266 	"meta":    true,
   269 	"param":  true,
   267 	"param":   true,
   270 	"source": true,
   268 	"source":  true,
   271 	"track":  true,
   269 	"track":   true,
   272 	"wbr":    true,
   270 	"wbr":     true,
   273 }
   271 }