Skip to content

A sample code for ast.While should be colored correctly like the other examples. #132608

@Tan90909090

Description

@Tan90909090

Documentation

A sample code for ast.While currently looks like this:

Image

Currently, all of the sample code is displayed in gray, and there is no syntax highlighting for print functions or a string literal.

The sample code should be colored correctly like the other examples, like a sample code for ast.For:

Image

Amendment proposal

I don't know a syntax for reStructuredText, but I find it odd that > characters are only two as an prompt, not three:

>> print(ast.dump(ast.parse("""

I think if we make the prompt > three characters like the other sample codes it will be colored correctly:

-         >> print(ast.dump(ast.parse("""
+         >>> print(ast.dump(ast.parse("""

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    docsDocumentation in the Doc dir

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions