100pah commented on issue #11878: More powerful formatters: pipes URL: https://github.com/apache/incubator-echarts/issues/11878#issuecomment-568799711 The grammar `{a | method} ` conflicts with rich text (`{styleName|real text}`). Probably it needs to consider another grammar. ```js // (A) ? formatter: '{a : method1 : method2(123)}' formatter: 'xxxx {style1|{a : method1 : method2(123)}}' // in rich text formatter: 'xxxx {style1|yyyy} {a : method1 : method2(123)}' // in rich text // (B) ? formatter: '{a => method1 => method2(123)}' formatter: 'xxxx {style1|{a => method1 => method2(123)}}' // in rich text formatter: 'xxxx {style1|yyyy} {a => method1 => method2(123)}' // in rich text // (C) ? formatter: '{a # method1 # method2(123)}' formatter: 'xxxx {style1|{a # method1 # method2(123)}}' // in rich text formatter: 'xxxx {style1|yyyy} {a # method1 # method2(123)}' // in rich text // (D) ? formatter: '{a $ method1 $ method2(123)}' formatter: 'xxxx {style1|{a $ method1 $ method2(123)}}' // in rich text formatter: 'xxxx {style1|yyyy} {a $ method1 $ method2(123)}' // in rich text ``` We'd better avoid common calculation characters are used as delimiter. And we may also need to consider some how it makes break change and how to escape functional characters like `{` `}` `|`
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
