Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

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

Copy link
Copy link
Closed
@Tan90909090

Description

@Tan90909090
Issue body actions

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 dirDocumentation in the Doc dir

    Projects

    Status

    Todo
    Show more project fields

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.