janjongboom / mbed-simulator

Experimental simulator for Mbed OS 5 applications
Other
175 stars 65 forks source link

Remove unnecessary double quote escape in config value #16

Closed takuti closed 5 years ago

takuti commented 5 years ago

As the documentation shows, users have to explicitly escape double quotes in string config value e.g., "value": "\"Hello!\"".

Thus, the config parser doesn't need to escape the character; current parser implementation value = value.replace(/"/g, '\\"'); causes an error against the appropriately escaped config value as:

<command line>:17:38: note: expanded from here
#define MBED_CONF_APP_WELCOME_STRING \Hello!\\

We can delete the parser-side escape code.

takuti commented 5 years ago

@janjongboom How do you think about this?

janjongboom commented 5 years ago

Verified and released as 1.6.4, thanks!