Yokmp / atom-autocomplete-factorio

Factorio Lua API autocomplete for Atom.
https://atom.io/packages/provider-factrio-lua-api
MIT License
2 stars 1 forks source link

Description not sanitized causing some snippets to not load #1

Closed Nexela closed 7 years ago

Nexela commented 7 years ago

Using Git Bash - mingw Descriptions containing apostrophes cause the .cson to have errors. fix below

function clean_string($name, $switch = 'preg') { switch ($switch) { case 'preg': $name = preg_replace( "/\s+/", "", $name ); break; case 'str': $name = str_replace(array("\r", "\n"), '', $name); $name = str_replace("'", "\'", $name); break; } return $name; }

Yokmp commented 7 years ago

Switched from coffee/cson to js/json and removed snippets. For now at least. And yes, I found that last night too. So its Fixed.