javalent / fantasy-statblocks

Create Dungeons and Dragons style statblocks for Obsidian.md
MIT License
341 stars 71 forks source link

Traits field was not overwrited when specified. #348

Open KSarn21 opened 5 months ago

KSarn21 commented 5 months ago

Check for existing bug reports before submitting.

Expected Behavior

When specified as follow

monster: Ancient Black Dragon
name: Paarthurnax
traits:
  - name: Overwriting Trait
    desc: This trait should overwrited all of the existing traits list, instead of appending to them.

The original traits should have been overwrited.

Current behaviour

When specified as follow

monster: Ancient Black Dragon
name: Paarthurnax
traits:
  - name: Overriding Trait
    desc: This trait should overwrited all of the existing traits list, instead of appending to them.

The overriding traits appended to the existing list of traits, instead of replacing the original list.

Reproduction

  1. Open Obsidianmd
  2. Install the fantasy statblocks plugin
  3. Create a new note called "test"
  4. Insert the following code
creature: Acolyte
actions:
  - name: A
    desc: B
  1. Action "A" and description "B" will be appended to the end of the existing actions list instead of overriding it.

Which Operating Systems are you using?

Obsidian Version Check

1.4.16

Plugin Version

3.18.1

Confirmation

Possible solution

No response