javalent / fantasy-statblocks

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

🐞 Markdown rendered wikilinks look weird on 3.15.7 #301

Closed silentjames closed 10 months ago

silentjames commented 10 months ago

Check for existing bug reports before submitting.

Expected Behavior

Wikilinks work and are rendered as expected.

Current behaviour

I use some wikilinks as property value in my statblocks. For example, I link magic abilities to easily see the full description and other conditions. With new update, markdown rendered links now look like this:

image

"Render as Markdown" toggle is disabled for the first line, and enabled for the second one. HTML for the first line:

<div class="statblock-rendered-text-content inline svelte-1lnliuc">
     <a data-href="Π₯ΠΈΡ‰Π½ΠΈΠΊ" href="Π₯ΠΈΡ‰Π½ΠΈΠΊ" class="internal-link" target="_blank" rel="noopener">Π₯ΠΈΡ‰Π½ΠΈΠΊ</a> 
</div>

HTML for the second line:

<div class="statblock-markdown svelte-1c3hzq4 el-p" data-tag-name="p">
   <p>
      <a data-href="<STATBLOCK-WIKI-LINK>ΠžΠ΄ΠΈΠ½ΠΎΡ‡ΠΊΠ°<STATBLOCK-WIKI-LINK>" href="<STATBLOCK-WIKI-LINK>ΠžΠ΄ΠΈΠ½ΠΎΡ‡ΠΊΠ°<STATBLOCK-WIKI-LINK>" class="internal-link" target="_blank" rel="noopener">&lt;STATBLOCK-WIKI-LINK&gt;ΠžΠ΄ΠΈΠ½ΠΎΡ‡ΠΊΠ°&lt;STATBLOCK-WIKI-LINK&gt;</a>
   </p>
</div>

Also, the link itself is wrong in this case:

image

Reproduction

  1. Create property container;
  2. Link monster property as you want, for example "name1:;
  3. Add statblock to a note and add name1: [[Other Note Name]];
  4. Switch to reading mode -> the link looks fine;
  5. Go to statblock settings and toggle "Render as Markdown" on;
  6. Return back to the note -> the link looks like [<STATBLOCK-WIKI-LINK>Other Note Name<STATBLOCK-WIKI-LINK>] and redirects to empty page.

Which Operating Systems are you using?

Obsidian Version Check

1.4.16 and 1.4.13

Plugin Version

3.15.7

Confirmation

Possible solution

No response

valentine195 commented 10 months ago

What does the source text look like?

silentjames commented 10 months ago

@valentine195 you mean, inside the statblock?


nature: [[Π₯ΠΈΡ‰Π½ΠΈΠΊ]]
demeanor: [[ΠžΠ΄ΠΈΠ½ΠΎΡ‡ΠΊΠ°]]
concept: [[Π‘ΠΎΠ»Π΄Π°Ρ‚]]
valentine195 commented 10 months ago

Yeah, I have a fix coming soon I think, thanks.

valentine195 commented 10 months ago

Can you try 3.15.8?

silentjames commented 10 months ago

Yes, it works now, thank you!