Closed myfonj closed 4 months ago
Thanks for the minimal reproduction case. It appears as though it thinks the the portion outside of the @-moz-document
consists entirely of comments. This is because it starts with /*
and ends with */
(ignoring whitespace). The CSS parser is not very sophisticated in this way, but I think I can fix this case.
I've put in a fix; let me know if this is still an issue.
Note the contents of version-specific code URLs are cached for 24 hours, so https://update.greasyfork.org/scripts/486968/1325339/Test%20style%20for%20debugging%20conversion%20to%20userscript.user.js may not show the fix until tomorrow.
The global part seems to be completely omitted from JS version of userstyle when there is a comment before
@-moz-document
block at the end of the "global" part.Test: https://greasyfork.org/en/scripts/486968-test-style-for-debugging-conversion-to-userscript/code?version=1325339
https://update.greasyfork.org/scripts/486968/1325339/Test%20style%20for%20debugging%20conversion%20to%20userscript.user.css :
produces https://update.greasyfork.org/scripts/486968/1325339/Test%20style%20for%20debugging%20conversion%20to%20userscript.user.js :
NB there is no
el { color: green; }
whatsoever.While https://greasyfork.org/en/scripts/486968-test-style-for-debugging-conversion-to-userscript/code?version=1325324
https://update.greasyfork.org/scripts/486968/1325324/Test%20style%20for%20debugging%20conversion%20to%20userscript.user.css
produces
What is OK.
Got couple of bugreports for https://greasyfork.org/en/scripts/408378-unround-everything-everywhere/feedback when hit this problem.