carlonicora / obsidian-rpg-manager

RPG Manager is a tool to simplify the plot, run and track of role playing game campaigns, helping storytellers to run better campaigns in less time.
MIT License
161 stars 18 forks source link

[Bug]: Infinite insert of new lines #345

Open Arkh42 opened 4 months ago

Arkh42 commented 4 months ago

Check for existing bug reports before submitting.

Expected Behavior

When I open an element and do not edit, it should not be automatically edited.

Current behaviour

When I open an element (bug currently observed on Sessions, Locations, Factions, and NPC), it is automatically edited without any action from myself. An infinite amount of new lines is inserted between the code block of RPG Manager and the links automatically added for relationships at the bottom of the page.

Reproduction

Currently, I cannot find a way to reproduce the problem.

Options enabled within RPG Manager:

It seems to be due to a bad parsing of elements that are linked through a relationship. If this is confirmed, the steps to reproduce the issue are:

  1. create an NPC
  2. create a Location
  3. link them with a Relationship
  4. close Obsidian
  5. restart Obsidian

This could be related to issues #340 and #341

Which Operating Systems are you using?

Obsidian Version Check

1.5.12

Plugin Version

4.1.14

Confirmation

Possible solution

No response

Arkh42 commented 4 months ago

I might have found the origin of the issue.

This seems to happen when I create a wiki link somewhere in the fields.

So, to reproduce the issue, I suggest the following procedure:

  1. Create an NPC.
  2. Create a Location.
  3. Link them with a Relationship.
  4. In the NPC description field, reference the location by using a Wiki link, e.g., [[Location_name]].
  5. Close Obsidia.
  6. Restart Obsidian.
  7. Go in the NPC page and check if new lines are inserted. If not, try to edit a field.