javalent / fantasy-statblocks

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

Multiple Spell Blocks causes paragraph break to be introduced to first Spell Block #337

Closed KupaRizu closed 2 months ago

KupaRizu commented 6 months ago

Check for existing bug reports before submitting.

Expected Behavior

When using multiple Spell Blocks in a layout the rendering of the blocks should be consistent.

Current behaviour

Currently if multiple Spell Blocks are implemented in a layout then the topmost Block displays with a paragraph break between the spell source and the spell list, as below: image

This triggers when more than one Spell Blocks are defined and used and always affects the topmost block, even if there are other Block types or rules between the Spell Blocks: image

Layout and Statblock: image

statblock
layout: Test Layout
name: Test Statblock

spells:
  - Here is the first spell block
  - 1st spellblock spell: 1st spellblock spell description.

testproperty: This is a property line

spells2:
  - Here is the second spell block
  - 2nd spellblock spell: 2nd spellblock spell description.

spells3:
  - Here is a third spell block
  - 3rd spellblock spell: 3rd spellblock spell description.

Reproduction

  1. Launch Obsidian in Sandbox Vault
  2. Install Fantasy Statblocks
  3. Create a layout with more than one Spell Block
  4. Create a monster that utilises more than one Spell Block

Which Operating Systems are you using?

Obsidian Version Check

1.5.3

Plugin Version

3.16.3

Confirmation

Possible solution

At the moment a workaround given in https://github.com/javalent/fantasy-statblocks/issues/138 is to use Traits as alternative Spell Blocks.

KupaRizu commented 6 months ago

Further notes:

If the Spell Blocks are set to Conditional this will still trigger even if only one block is used: image

It will also trigger on the topmost block when multiple Conditional Spell Blocks are used, even if it isn't the first Spell Block in the layout: image