Azgaar / Fantasy-Map-Generator

Web application generating interactive and highly customizable maps

Home Page:https://azgaar.github.io/Fantasy-Map-Generator

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

.map can't get loaded from gist

TazztheMonster opened this issue · comments

Describe the bug
If I try to load a map from an URL, exactly from an gist, I just get an "Ivalid file" error.

Steps to reproduce

  1. Click on "Save"
  2. Click on "machine"
  3. Go to "https://gist.github.com/"
  4. Upload saved file from step 2
  5. Copy raw link from uploaded file
  6. Open azgaar again
  7. Click on "Load"
  8. Click on "URL"
  9. Paste link to gist file
  10. Click on "Load"

Expected behavior
The map should get loadet.

.map file
https://gist.githubusercontent.com/TazztheMonster/3a8af87f933f21c290f8633872f50f09/raw/bac7435627faee3b35ca94669ecac1a48b080374/Ailealand%25202022-06-22-16-54.map
Ailealand 2022-06-22-16-54.zip

Screenshots
image

System

  • Version: 1.86.10
  • Browser: Google Chrome (Version 102.0.5005.115 64-Bit)
  • OS: Windows 11

Gist removes new line chars we use as delimiter. const mapData = decoded.split("\r\n");, so map data is detected incorrectly. In the future (but probably not now) I would like to change delimiters to something more robust

Closing, tracked in Trello as a major refactoring item