obsidian-slides-extended icon indicating copy to clipboard operation
obsidian-slides-extended copied to clipboard

🐛 Class names with double underscores are converted to asterisks

Open JBrogie opened this issue 5 months ago • 0 comments

Input data (markdown source)

Item 1<!-- element class="animate__fadeIn" -->

Item 2<!-- element class="animate__fadeIn" -->

Item 3<!-- element class="animate__fadeIn" -->

Expected Behavior

Unchanged class names with double underscores.

Current behaviour

Class names with double underscores are changed to double asterisks:

Item 1<!-- element class="animate**fadeIn" -->

Item 2<!-- element class="animate**fadeIn" -->

Item 3<!-- element class="animate__fadeIn" -->

Steps to reproduce

Class names with double underscores such as those required by the Appearance plugin for reveal.js.

Which Operating Systems are you using?

  • [ ] Android
  • [ ] iPhone/iPad
  • [ ] Linux
  • [ ] macOS
  • [ ] Windows

Obsidian Version

1.8.10

Slides Extended Plugin Version

2.1.12

Checks

  • [x] I have tried it in the sandbox vault with only this plugin enabled

Possible solution

When an odd number of these class names is used the last instance isn't converted, so I suspect this regex is the culprit:

https://github.com/ebullient/obsidian-slides-extended/blob/e30b55d5856b126ea89e373d978fea4bd75d8be6/src/obsidian/processors/formatProcessor.ts#L5

JBrogie avatar May 24 '25 07:05 JBrogie