Berserk-Games / atom-tabletopsimulator-lua

Tabletop Simulator scripting package for Atom.
Other
36 stars 27 forks source link

Unicode characters in script prevents data being sent to external editor #81

Open jonesmz opened 6 years ago

jonesmz commented 6 years ago

For example, the OLD api documentation, for createButton, here: http://berserk-games.com/knowledgebase/object/

Has the line

button_parameters.alignment = int (1 = Automatic, 2 = Left, 3 = Center, 4 = Right, 5 = Justified) –Optional

That dash before Optional is unicode character x02013.

Having that character ANYWHERE in a script, even if it's the only character, will render the right-click -> Scripting -> Script Editor action completely useless. No message gets sent to the external editor. Nothing.

onelivesleft commented 6 years ago

I pasted your line into an object and global, but everything worked ok. Tried a bunch of other unicode; all worked fine.

jonesmz commented 6 years ago

Have you tried reproducing on Linux?

It doesn't seem to effect windows builds.

I had a third party reproduce on Linux as well.

jonesmz commented 6 years ago

To clarify further, putting that specific unicode character in a specific script only prevented that script from being sent to an external editor.

Now that I re-read my initial report, I cans ee how that might have been unclear.