rope icon indicating copy to clipboard operation
rope copied to clipboard

sphinx gives three warnings for overview.rst

Open edreamleo opened this issue 2 years ago • 2 comments

> 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.

edreamleo avatar Feb 05 '23 12:02 edreamleo

I've been thinking for the longest time that I should convert these examples to an asciinema. That would avoid the need to have these marker texts that freaks out the highlighters.

Problem is just that there doesn't seem to be an easy way to embed the player into RTD, you need to click over into a separate site to play the asciinema. Same thing with regular video. Animated GIF is an alternative, but it has usability issues, you can't copy or pause them, etc. Maybe we'll just have to cop it and host our own documentation site.

Need more research done here.

lieryan avatar Feb 06 '23 01:02 lieryan

@lieryan Thanks for your comments. Good to know the details.

edreamleo avatar Feb 06 '23 06:02 edreamleo