GnaspGames / Smelt

A CLI tool for Minecraft map makers
http://smelt.gnasp.com
MIT License
19 stars 4 forks source link

Lines containing a URL ignored due to // #45

Closed Moesh-zz closed 8 years ago

Moesh-zz commented 8 years ago

Comments should be differentiated from URLs, but also tracked if used in JSON or NBT data.

GnaspGames commented 8 years ago

Okay, so this is a fiddly one.

The issue is // found withing a string. A string is anything found withing double quotes. Example:

"value": { "translate": "Ideal Development Environment\nby Moesh (http://moesh.ca)"}

My solution is going to be to match strings that contain // and ignore them, while still removing other comments.