Manually creating a node makes coordinates freak out
TheMartianLife opened this issue · 6 comments
TheMartianLife commented
AdamJScott commented
Works as intended
CullieM commented
shows how lazy we are, I havent manually typed a node in decades
AdamJScott commented
/cib
create-issue-branch commented
Branch 77-Manually-creating-a-node-makes-coordinates-freak-out created!
AdamJScott commented
if (allLines[i].match(/---/))
{
if (metadata !== null && metadata.size !== 0)
{
let increment = 0;
metadata.forEach((value, key) =>
{
const stringToInsert = key + ": " + value;
allLines.splice(i + increment, 0, stringToInsert);
increment++;
changesOccured = true;
metadata.delete(key.trim());
});
//Assign the lines
}
}
Issue caused by having i + increment - 1
, which caused the metadata to be placed above the title line, but the check was only looking for xpos and ypos between title and dialogue delimiter, ergo, infinite (1500) insertions above title.
Further work will need to be done to allow for x and y pos to be stored above title as legal metadata
TheMartianLife commented
I thought title:
had to be the first field, so maybe check with Jon that that's supposed to be allowed before you bother changing stuff.