tobiasah / mkdocs-caption

MkDocs plugin to add captions and easy element numbering
MIT License
5 stars 1 forks source link

Interference with Icons and Emojis #13

Closed hug-sch closed 9 months ago

hug-sch commented 9 months ago

When adding support with Icons, Emojis; see [mkdocs-material] (https://github.com/squidfunk/mkdocs-material/blob/master/docs/reference/icons-emojis.md)) the shortcut to add an emoji to markdown is for example :smile:

This becomes after rendering: image

I assume that the "Figure 9" text and the center alignment is added by the mkdocs-caption plugin.

tobiasah commented 9 months ago

which version are you using ?

I aimed to fix this exact version with https://github.com/tobiasah/mkdocs-caption/commit/3c0fa5370fb90a6dd442c4717077b9e8417c7958

version 1.0.0 should contain this fix

hug-sch commented 9 months ago

I used mkdocs-caption == 0.0.10 but changed the requirements now to 1.0.0. The bug still remains. Should I do something else?

tobiasah commented 9 months ago

uh that is odd.

I just tired again with the demo I have in this repo (https://github.com/tobiasah/mkdocs-caption/tree/main/demo) and there the emoji is ignored by the caption plugin

can you check the class that your material theme uses for its emojis? for me, this is class="twemoji" which is actively ignored in by the caption plugin config ... if you have another class you can add It to the config (https://tobiasah.github.io/mkdocs-caption/config/) to the ignore_classes list.

hug-sch commented 9 months ago

Yes, I saw that. Here is my mkdocs.yml

Looks the same as yours :-)

hug-sch commented 9 months ago

Sorry. Just checked the version and is still mkdocs-caption==0.0.10. Thought that adding it to requirements.txt will also install it.

hug-sch commented 9 months ago

Yes. It's OK now. Thanks for quick reply.

tobiasah commented 9 months ago

👍 glad its resolved.