Active-CSS / active-css

The epic event-driven browser language for UI with functionality in one-liner CSS. Over 100 incredible CSS commands for DOM manipulation, ajax, reactive variables, single-page application routing, and lots more. Could CSS be the JavaScript framework of the future?
https://activecss.org
Other
42 stars 7 forks source link

When parsing config, convert tabs to spaces rather than just removing them #69

Closed bob2517 closed 3 years ago

bob2517 commented 3 years ago

Sometimes this syntax is wanted:

func: checkVar "{varTestString}"
    {varTestBooleanTrue}
    {varTestBooleanFalse}
    {varTestBooleanDigitPositive}
    {varTestBooleanDigitNegative}
    {varTestEvaluatedNumber}
;

If the tabs are simply removed, the variables would end up being lumped together after evaluation so they won't get evaluated correctly when sent as parameters and it'll be essentially this {= "cheese"12-10truefalse =} which is just wrong. They would effectively look like this after parsing

func: checkVar "{varTestString}"{varTestBooleanTrue}{varTestBooleanFalse}{varTestBooleanDigitPositive}{varTestBooleanDigitNegative}{varTestEvaluatedNumber};

Convert all tabs to spaces when parsing. This is an important note to make when minifying too.

bob2517 commented 3 years ago

A note on this: When minifying, tabs in component HTML should remain as tabs. All other tabs in the config can be converted to spaces.

bob2517 commented 3 years ago

Fix on branch - closing.