facebook / facebook/docusaurus

Comments can end up displaying inside description meta

Offen
#6,108 12 Kommentare 1 Reaktion 0 zugewiesene Personen Auf GitHub ansehen
bug domain: markdown
Vorherrschende Sprache
TypeScript
Sterne
66.2k
Forks
10k
Ø Merge
1 T. 3 Std.
Gemergte PRs (30 T.)
52

Beschreibung

### Have you read the Contributing Guidelines on issues?

- [X] I have read the Contributing Guidelines on issues.

### Prerequisites

- [X] I'm using the latest version of Docusaurus.
- [X] I have tried the `npm run clear` or `yarn clear` command.
- [X] I have tried `rm -rf node_modules yarn.lock package-lock.json` and re-installing packages.
- [ ] I have tried creating a repro with https://new.docusaurus.io.
- [X] I have read the console error message carefully (if applicable).

### Description

Issue: My .md or .mdx files are loading comments into the content of the meta property `og:description`
``````

### Steps to reproduce

Example code structure to replicate this issue:
```
---
slug: /link_here
title: Title text here
---

Page text here, lorem ipsum etc etc etc

## h2, etc etc etc
```

### Expected behavior

og:description should not be pulling comments in to fill its content

### Actual behavior

og:description seems to pull the first text after even if it's a comment?

No log messages output.

### Your environment

- Docusaurus version used: **2.0.0-beta.13, & 2.0.0-beta.9**
- Environment name and version (e.g. Chrome 89, Node.js 16.4): **Edge Version 96.0.1054.57 (Official build) (64-bit)**
- Operating system and version (e.g. Ubuntu 20.04.2 LTS): **Windows 10 Pro - 21H2**

I have already fixed this issue in prod on our site's affected page, https://docs.domination.finance/liquidity_providers, by manually overriding the meta tag for og:description

### Reproducible demo

_No response_

### Self-service

- [ ] I'd be willing to fix this bug myself.

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.