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

Function styleAttrStrToStyleMap

pkg/vdom/vdom_html.go:276–283  ·  view source on GitHub ↗
(styleText string, params map[string]any)

Source from the content-addressed store, hash-verified

274}
275
276func styleAttrStrToStyleMap(styleText string, params map[string]any) (map[string]any, error) {
277 parser := cssparser.MakeParser(styleText)
278 m, err := parser.Parse()
279 if err != nil {
280 return nil, err
281 }
282 return convertStyleToReactStyles(m, params), nil
283}
284
285func fixStyleAttribute(elem *VDomElem, params map[string]any, elemPath []string) error {
286 styleText, ok := elem.Props["style"].(string)

Callers 2

PFunction · 0.85
fixStyleAttributeFunction · 0.85

Calls 3

MakeParserFunction · 0.92
ParseMethod · 0.80

Tested by

no test coverage detected