sphinx gives three warnings for overview.rst

Offen
#658 2 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 7 Tagen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
2/5
Geschätzter Aufwand
1-3 Stunden
Anfängerfreundlichkeit
50/100
Issue-Typ
Bug
Klarheit
Größtenteils klar
Aktivitätsstatus
Veraltet
Tech-Stack
documentation, python
Bereich
documentation

Rechercherichtung

The warnings come from ${region_start} and ${region_end} markers inside code-block:: python blocks in docs/overview.rst, at lines 403, 424 and 1268. Build with sphinx-build -M html docs _build to reproduce them. Done when the build no longer warns and the def keyword is highlighted, which means either making those examples lexable or changing how the markers are shown. The thread has no reply in about 3.6 years, so confirm with a maintainer before starting.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

bug
> sphinx-build --version
sphinx-build 5.3.0
...
ekr-clone-rope2\docs> sphinx-build -M html . _build
...ekr-clone-rope2\docs\overview.rst:403: WARNING: Could not lex literal_block as "python". Highlighting skipped.
...ekr-clone-rope2\docs\overview.rst:424: WARNING: Could not lex literal_block as "python". Highlighting skipped.
...ekr-clone-rope2\docs\overview.rst:1268: WARNING: Could not lex literal_block as "python". Highlighting skipped.

The effect of the first warning is clearly visible on Rope's website. As you can see, the def keyword is not highlighted.

These warnings arise from the ${region_start} and ${region_end} markup. The first example is:

.. code-block:: python

  def a_func():
      a = 1
      b = 2 * a
      c = ${region_start}a * 2 + b * 3${region_end}

Heh. GitHub markdown renders this snippet correctly, but sphinx does not.

Vorherrschende Sprache
Python
Sterne
2.2k
Forks
197
Ø Merge
2 T. 13 Std.
Gemergte PRs (30 T.)
5

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus python-rope/rope

Alle Issues in python-rope/rope

Ähnliche Issues

Weitere Issues zu Python

Neue Issues direkt in Ihr Postfach

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