slidev icon indicating copy to clipboard operation
slidev copied to clipboard

BiDi support

Open alirezaalavi87 opened this issue 4 months ago • 3 comments

info:

  • slidev version: v52.0.0
  • node version: 20.18.3

BiDi text is not supported, even if you add dir: auto to the frontmatter. For example the text یک two سه is counting from one to three, but two is in english. this get's messed up because of forced LTR text

Describe the solution you'd like Support BiDi writing by default. One way is to add dir="auto" to every text element. This is the way I usually do it.

Describe alternatives you've considered

  • set dir: auto in frontmatter. doesn't work
  • create plugin or theme that supports BiDi, but its would be much much better for slidev to support BiDi out of the box.

alirezaalavi87 avatar Jul 29 '25 11:07 alirezaalavi87

Today, It seems to be working out of nowhere! adding dir: auto to frontmatter of the slide fixes the BiDi issue.

BUT, here's the issue. adding dir: auto to the headmatter doesn't apply to all slides as expected. you have to add it to the frontmatter of every slide.

alirezaalavi87 avatar Aug 06 '25 08:08 alirezaalavi87

How about

---
defaults:
  dir: auto
---

But that sounds like something we should fix indeed.

antfu avatar Aug 08 '25 01:08 antfu

Yes, the defaults way seems to be working. @antfu

alirezaalavi87 avatar Aug 09 '25 09:08 alirezaalavi87