emscripten-core / emscripten-core/emscripten

Regression: JS preprocessor is run on HTML files, failing on CSS styles

Open
#13,488 2 comments 0 reactions 0 assignees View on GitHub
wontfix
Dominant language
C++
Stars
27.6k
Forks
3.6k
Avg merge
1d 1h
Merged PRs (30d)
105

Description

In one of my HTML shell files, I have the CSS code
```
#results { color: white; margin: 25px;}
#results h1, #results h3, .gold { color: #F59D46; }
```
After updating Emscripten to latest (from some months ago), I started to now get

```
[ 98%] Linking CXX executable bin/Cards/Cards.html
parseTools.js preprocessor error in tmpw3bb3dvk.js:13: " #results { color: white; margin: 25px;}"!
undefined:111
throw e;
^

TypeError: i is not a function
at preprocess (eval at load (/Users/clb/emsdk/emscripten/master/tools/preprocessor.js:46:8), :88:78)
at Object. (/Users/clb/emsdk/emscripten/master/tools/preprocessor.js:59:83)
at Module._compile (internal/modules/cjs/loader.js:1138:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1158:10)
at Module.load (internal/modules/cjs/loader.js:986:32)
at Function.Module._load (internal/modules/cjs/loader.js:879:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
at internal/main/run_main_module.js:17:47
em++: error: '/Users/clb/emsdk/node/12.18.1_64bit/bin/node /Users/clb/emsdk/emscripten/master/tools/preprocessor.js /var/folders/y2/56116xmj2zz6qd0kyd9mpv7m0000gn/T/emscripten_temp_ktvd88kn/settings.js tmpw3bb3dvk.js' failed (1)
make[2]: *** [bin/Cards/Cards.html] Error 1
make[1]: *** [CMakeFiles/Cards.dir/all] Error 2
make: *** [all] Error 2
MacBook-Pro:emcc_cards clb$ st /Users/clb/emsdk/emscripten/master/tools/preprocessor.js
MacBook-Pro:emcc_cards clb$
```

as the JS preprocessor attempts to process the CSS style data. I wonder if something changed around here within a few months?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.