Skip to content

Commit 80ad85c

Browse files
committed
Use correct Pygments lexer for plain text
1 parent d4381aa commit 80ad85c

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

Doc/reference/lexical_analysis.rst

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -496,7 +496,11 @@ String and Bytes literals
496496
String literals are text enclosed in single quotes (``'``) or double
497497
quotes (``"``). For example:
498498

499-
.. code-block:: plain
499+
.. This is Python code, but we turn off highlighting because as of this
500+
writing, highlighted strings don't look good when there's no code
501+
surrounding them.
502+
503+
.. code-block:: text
500504
501505
"spam"
502506
'eggs'
@@ -505,7 +509,7 @@ The quote used to start the literal also terminates it, so a string literal
505509
can only contain the other quote (except with escape sequences, see below).
506510
For example:
507511

508-
.. code-block:: plain
512+
.. code-block:: text
509513
510514
'Say "Hello", please.'
511515
"Don't do that!"
@@ -531,7 +535,7 @@ either ``'`` or ``"``.)
531535

532536
For example:
533537

534-
.. code-block:: plain
538+
.. code-block:: text
535539
536540
"""This is a triple-quoted string with "quotes" inside."""
537541
@@ -560,7 +564,7 @@ String prefixes
560564
String literals can have an optional :dfn:`prefix` that influences how the literal
561565
is parsed, for example:
562566

563-
.. code-block:: plain
567+
.. code-block:: python
564568
565569
b"data"
566570
f'{result=}'

0 commit comments

Comments
 (0)