umijs/dumi

bug: menu render unexpect when docs dir path include `enum`

Open

#871 aperta il 11 set 2021

Vedi su GitHub
 (7 commenti) (0 reazioni) (0 assegnatari)JavaScript (1170 fork)github user discovery
buggood first issuesomeone working on it

Metriche repository

Star
 (3793 star)
Metriche merge PR
 (Metriche PR in attesa)

Descrizione

Versions

  • dumi:1.1.26
  • node:14.16.1
  • npm:6.14.12
  • OS:MacBook Pro (13-inch, M1, 2020)
  • Browser:Google Chrome 93.0.4577.63 (arm64)

Steps to reproduce

  1. Create a folder named with enum in the docs directory, like this:
docs
├── docs
│   └── enum
│       ├── ListCard.en.md
│       └── ListCard.md
├── index.en.md
└── index.md

With locale config:

locales: [
  ['zh', '中文'],
  ['en', 'English'],
],
  1. Click locale bar changing current language, enum menu render error:

Living demo: https://saber2pr-umi.github.io/test-dumi-enum/en/docs/enum/list-card

Demo source code: https://github.com/saber2pr-umi/test-dumi-enum

What is Expected?

  • The menu path can contain enum words

  • In Chinese, only the Chinese menu is displayed

  • In English, only the English menu is displayed

What is actually happening?

living.gif

Guida contributor