MCPcopy Index your code
hub / github.com/wavetermdev/waveterm / fixStyleAttribute

Function fixStyleAttribute

pkg/vdom/vdom_html.go:285–296  ·  view source on GitHub ↗
(elem *VDomElem, params map[string]any, elemPath []string)

Source from the content-addressed store, hash-verified

283}
284
285func fixStyleAttribute(elem *VDomElem, params map[string]any, elemPath []string) error {
286 styleText, ok := elem.Props["style"].(string)
287 if !ok {
288 return nil
289 }
290 styleMap, err := styleAttrStrToStyleMap(styleText, params)
291 if err != nil {
292 return fmt.Errorf("%v (at %s)", err, makePathStr(elemPath))
293 }
294 elem.Props["style"] = styleMap
295 return nil
296}
297
298func fixupStyleAttributes(elem *VDomElem, params map[string]any, elemPath []string) {
299 if elem == nil {

Callers 1

fixupStyleAttributesFunction · 0.85

Calls 2

styleAttrStrToStyleMapFunction · 0.85
makePathStrFunction · 0.85

Tested by

no test coverage detected