tmedwards / tweego

Tweego is a free (gratis and libre) command line compiler for Twine/Twee story formats, written in Go.
https://www.motoslave.net/tweego
BSD 2-Clause "Simplified" License
124 stars 23 forks source link

Decompiling / recompiling with CSS containing pseudo elements like ::-webkit-scrollbar #41

Open Scaalp-fr opened 2 years ago

Scaalp-fr commented 2 years ago

Describe the bug When decompiling a file (using -d option) and it contains pseudo elements in CSS like ::-webkit-scrollbar, the resulting file cannot be recompiled as the pseudo element is taken as the name of a passage, if the pseudo-element is at the beginning of a line.

Expected behavior I would expect that decompiling and then recompiling any file without modifying it should work.

Desktop:

Additional context This is probably not a severe problem. I don't even know if this should be handled while decompiling or while compiling. My way to work around the problem is to add a space character before ::-webkit-…, so that it is not taken as a new passage.

The - being illegal as the first character of a passage name, the compilation generates an error, which is good.

The easiest solution to handle the problem is maybe to describe it, with a workaround, somewhere in the documentation.