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

Error with checking for escaped single quote in JS expression #341

Closed bob2517 closed 10 months ago

bob2517 commented 11 months ago

This results in an unmatched parenthesis error and shouldn't:

    @if ($data.replace(/[\"\']/g, "") != "") {  
    }
bob2517 commented 11 months ago

ACSS needs to support single quotes - not supporting single quotes is causing issues in the core.

bob2517 commented 11 months ago

Whilst on the topic of supporting JS, support // comments in the config. Will only work if the config loaded has a definitive end of line at the end of the // comments.

bob2517 commented 11 months ago

Note to self: the code editor on the docs site uses innerHTML to put the results in the result area. Innerhtml by default removes newlines (https://bugzilla.mozilla.org/show_bug.cgi?id=838954), so // removal doesn't yet work in there - this is a code editor error rather than a core error. This may also be replicated for regular embedded ACSS, so needs checking out.

bob2517 commented 11 months ago

Limiting // removal to external files for now - the browser appears to remove newlines for pages as soon as it gets parsed by the browser, so // removal is seemingly next to impossible - can't accurately determine when the comment ends.

bob2517 commented 11 months ago

Fixed offline, will put on branch today.

bob2517 commented 10 months ago

Closing pending release.