javalent / admonitions

Adds admonition block-styled content to Obsidian.md
MIT License
1.05k stars 67 forks source link

Accent in Admonition title does not show up #280

Closed AwePhD closed 1 year ago

AwePhD commented 1 year ago

Hello,

First of all thanks for this plugin, it's very great. I like to add admonitions to add visual effect to the note. Concise and beautiful.

Description of the problem

I want to add accent to my admonition title. I set the title correctly (see below) and the accent is even showing on the preview. Although, in admonition settings and in my notes, I cannot see my accent.

The example is an admonition type defi and its displayed title should Défis, I got Defis instead :smiling_face_with_tear: .

My defi admonition settings (the 'é' is showing up here): image

Admonition settings preview (no 'é'): image

Admonition in a note (no 'é'): image

Can you fix it, please? Or maybe I am doing something wrong.

What I tried

System info

AwePhD commented 1 year ago

I have additional data. If I add any text to the admonition then the error is fixed. But if I reload the note (close / open Obsidian for example), the accent disappear.

I take a note as exemple, the problem is showing. Then I add a blank line. The é is showing. I reload, the problem is back. Then I delete the blank line, the problem is solved: é is back. Reload, I still have the problem.

demo

(I forgot to mute the audio)

AwePhD commented 1 year ago

Plus, I have noticed that if I insert an admonition - your feature - it will have the accent on the title, no matter the reload. However, if I insert a callout - Obsidian feature - there is the problem that I described here.

sigrunixia commented 1 year ago

@AwePhD Hello! Admonitions applies alpha styling to the color you select to fade it. It also has its own css selector .admonition, which is why you get different results between the two.

You'll need to choose a darker color, control via custom css, or alter admonitions css directly (See https://github.com/valentine195/obsidian-admonition/blob/master/src/assets/main.css for the css to edit).

valentine195 commented 1 year ago

@AwePhD it might be better to open a bug report about this on the obsidian forums. It’s hard to change the underlying callout behavior because of the way it’s baked into the rest of the markdown rendering.