Skip to content

R code chunks are labeled as S #1650

Discussion options

You must be logged in to vote

I'm assuming you are using the title feature?

The reason is due to the lexer name. It is used for other languages as well: https://github.com/pygments/pygments/blob/master/pygments/lexers/r.py#L74

Notice:

    """
    For S, S-plus, and R source code.
    .. versionadded:: 0.10
    """

They just chose S as the main name.

You may want to try a title remap: https://facelessuser.github.io/pymdown-extensions/extensions/superfences/#code-block-title-headers

extension_configs = {
    "pymdownx.highlight": {
        "auto_title": True,
        "auto_title_map": {
            "S": "R"
        }
    }
}

Replies: 4 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by facelessuser
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
T: support Support request.
2 participants
Converted from issue

This discussion was converted from issue #1649 on March 28, 2022 20:34.