umijs/dumi

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

オープン

#871 opened on 2021/09/11

 (7 件のコメント) (0 件のリアクション) (0 人の担当者)JavaScript (1,169 件のフォーク)github user discovery
buggood first issuesomeone working on it

Repository metrics

Stars
 (3,796 個のスター)
PR merge metrics
 (平均マージ 4h 27m) (30d で 21 merged PRs)

説明

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

コントリビューターガイド