Auto-generated description drops the text between two colons in the first paragraph
@0z5a がすでに取り組んでいます。
2026年11月15日 から。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 84/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- markdown, node.js, react, typescript
- 領域
- backend, documentation
調査の方向性
packages/docusaurus-utils/src/markdownUtils.ts の createExcerpt() から始め、絵文字のクリーンアップパターンを issue で説明されている remark-emoji のショートコードパターンと比較します。ヘルパーの既存のテストを確認し、時刻、文章中のコロン、URL、絵文字のショートコードのケースを追加します。実際のショートコードが削除され、コロンで挟まれたその他のテキストがそのまま残れば完了です。
索引モデルが issue の本文から書いたものです。
説明
Have you read the Contributing Guidelines on issues?
- I have read the Contributing Guidelines on issues.
Prerequisites
- I'm using the latest version of Docusaurus.
- I have tried the
npm run clearoryarn clearcommand. - I have tried
rm -rf node_modules yarn.lock package-lock.jsonand re-installing packages. - I have tried creating a repro with https://new.docusaurus.io.
- I have read the console error message carefully (if applicable).
Description
When a doc, blog post or page has no description front matter, the description Docusaurus generates from the first paragraph (<meta name="description">, og:description, DocCard text on category index pages, blog feed items) loses everything between the first and the last colon of that line.
The emoji-shortcode cleanup in createExcerpt() (packages/docusaurus-utils/src/markdownUtils.ts) uses /\s?:(?:::|[^:\n])+:/g, which matches any text between two colons, spaces included, not just shortcodes like :wink:.
The Docusaurus website shows it today: https://docusaurus.io/docs/3.8.1/sidebar/items has no description front matter, and its first paragraph is "We have introduced three types of item types in the example in the previous section: doc, category, and link, whose usages are fairly intuitive. We will formally introduce their APIs. There's also a fourth type: autogenerated, which we will explain in detail later." The page ships <meta name="description" content="We have introduced three types of item types in the example in the previous section autogenerated, which we will explain in detail later."/>.
Reproducible demo
https://docusaurus.io/docs/3.8.1/sidebar/items (view the page source, description / og:description meta tags)
Steps to reproduce
- Open https://docusaurus.io/docs/3.8.1/sidebar/items and look at its
<meta name="description">; compare it with the first paragraph ofwebsite/versioned_docs/version-3.8.1/guides/docs/sidebar/items.mdx. - Or call the helper directly on main:
createExcerpt('Meeting runs 10:30 to 11:45 daily.')from@docusaurus/utilsreturns'Meeting runs 1045 daily.'. Docs, blog posts and pages use this excerpt asdescriptionwhen the front matter has none.
Expected behavior
The description keeps the sentence as written (Meeting runs 10:30 to 11:45 daily.), the same way the page body renders it. Only real emoji shortcodes such as :wink: or :+1: should be removed, matching what remark-emoji (markdown.emoji, on by default) converts: /:\+1:|:-1:|:[\w-]+:/g.
Actual behavior
Meeting runs 10:30 to 11:45 daily.givesMeeting runs 1045 daily.Note: install first. Tip: run the build.givesNote run the build.Download it from https://nodejs.org. Then run: npm cigivesDownload it from https npm ci
Your environment
- Docusaurus version used: main
- Environment name and version: Node.js, any
- Operating system and version: any
Self-service
- I'd be willing to fix this bug myself.
This issue was drafted with Claude Code (claude-opus-5-5); the results above are from the runs described.
- 主要言語
- TypeScript
- スター
- 66.6k
- フォーク
- 10.1k
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
facebook/docusaurus のほかの issue
-
write heading ids modifies headings inside tilde and longer fenced code blocks対応中かも @VaibhavBajpaij が 6 日前に担当しました。 オープンbug status: needs triage
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
facebook/docusaurus#13061 · コメント 1 件 ·
-
Playground cards have inconsistent heights対応中かも @anishagrawal25 が 31 日前に担当しました。 オープンbug status: needs triage
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
facebook/docusaurus#12739 · コメント 1 件 ·
-
Page title drops a trailing # from the heading, e.g. # Learn C# becomes "Learn C" (AI-assisted)対応中かも @saiyam-jain-dev が 19 日前に担当しました。 オープンbug status: needs triage
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
facebook/docusaurus#12644 · コメント 1 件 ·
-
Firefox clips descenders in documentation sidebar labels on Windows対応中かも @xusnitdinov が 126 日前に担当しました。 オープンbug status: needs triage
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
facebook/docusaurus#12299 ·
-
domain: dependencies proposal
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
facebook/docusaurus#13080 ·
facebook/docusaurus の issue をすべて見る
似ている issue
-
The manager preset saves launch definitions without the required file and digest pair対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 80/100
メンテナーはふだん 1 日以内に返信