reactjs / reactjs/react.dev

Code block breaks the pages width

Offen
#1,006 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Vorherrschende Sprache
JavaScript
Sterne
11.8k
Forks
7.9k
Ø Merge
1 T. 11 Std.
Gemergte PRs (30 T.)
11

Beschreibung

screenshot from 2018-06-27 02-27-12

The code block word wrap doesn't work in this case of

const domContainer = document.querySelector('#like_button_container');

breaks the width of the page

Maybe add https://prismjs.com/plugins/normalize-whitespace/

break-lines?

PrismJS doesn't handle line wrap of document.querySelector('#like_button_container'); dot or string, it treat it as a whole thing.

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

Start by reproducing the overflowing code block shown in the issue on the React documentation website, then inspect the code-block rendering and styling entry points. Compare the behavior with PrismJS's line-wrapping options. Done means long unbroken code such as document.querySelector('#like_button_container') wraps without widening the page.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
javascript, react
Bereich
documentation, frontend
Issue-Typ
Bug
Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
45/100

Neue Issues direkt in Ihr Postfach

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