Open St-Lukas opened 8 years ago
Content of data-attributes is often JSON-serialized string. So if double-quotes is used in attributes then data-attributes are escaped with overhead and looks unreadable because JSON-serialization uses double quotes too. Example: http://bem.github.io/bem-xjst/?bemhtml=%20&bemjson=%7B%0A%20%20%20%20block%3A%20%27a%27%2C%0A%20%20%20%20attrs%3A%20%7B%0A%20%20%20%20%20%20%20%20%27data-info%27%3A%20%27%7B%22a%22%3A%22b%22%7D%27%0A%20%20%20%20%7D%0A%7D
cc @miripiruni
See: https://github.com/bem/bem-xjst/blob/master/lib/bemhtml/index.js#L172
Related: https://github.com/bem/bem-xjst/pull/504
Content of data-attributes is often JSON-serialized string. So if double-quotes is used in attributes then data-attributes are escaped with overhead and looks unreadable because JSON-serialization uses double quotes too. Example: http://bem.github.io/bem-xjst/?bemhtml=%20&bemjson=%7B%0A%20%20%20%20block%3A%20%27a%27%2C%0A%20%20%20%20attrs%3A%20%7B%0A%20%20%20%20%20%20%20%20%27data-info%27%3A%20%27%7B%22a%22%3A%22b%22%7D%27%0A%20%20%20%20%7D%0A%7D