Auto-generated description drops the text between two colons in the first paragraph
@0z5a ci sta già lavorando.
Dal 15/11/2026.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 84/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- markdown, node.js, react, typescript
- Ambito
- backend, documentation
Direzione di ricerca
Inizia con createExcerpt() in packages/docusaurus-utils/src/markdownUtils.ts e confronta il suo schema di pulizia delle emoji con lo schema degli shortcode di remark-emoji descritto nell’issue. Controlla i test esistenti dell’helper e aggiungi casi per orari, due punti nel testo, URL e shortcode delle emoji. Il lavoro è completato quando gli shortcode effettivi vengono rimossi e il resto del testo tra i due punti rimane intatto.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- TypeScript
- Stelle
- 66.6k
- Fork
- 10.1k
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di facebook/docusaurus
-
write heading ids modifies headings inside tilde and longer fenced code blocksForse già presa @VaibhavBajpaij l’ha presa 6 giorni fa. Apertabug status: needs triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
facebook/docusaurus#13061 · 1 commento ·
-
Playground cards have inconsistent heightsForse già presa @anishagrawal25 l’ha presa 31 giorni fa. Apertabug status: needs triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
facebook/docusaurus#12739 · 1 commento ·
-
Page title drops a trailing # from the heading, e.g. # Learn C# becomes "Learn C" (AI-assisted)Forse già presa @saiyam-jain-dev l’ha presa 19 giorni fa. Apertabug status: needs triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
facebook/docusaurus#12644 · 1 commento ·
-
Firefox clips descenders in documentation sidebar labels on WindowsForse già presa @xusnitdinov l’ha presa 126 giorni fa. Apertabug status: needs triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
facebook/docusaurus#12299 ·
-
domain: dependencies proposal
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
facebook/docusaurus#13080 ·
Tutte le issue di facebook/docusaurus
Issue simili
-
The manager preset saves launch definitions without the required file and digest pairForse già presa Una pull request collegata a questa issue è aperta o già unita. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 80/100
I maintainer di solito rispondono entro 1 giorno