R code chunks are labeled as S #1650
-
DescriptionWhen highlight R code pymdown highlights the code as S. Minimal ReproductionVersion(s) & System Info
|
Beta Was this translation helpful? Give feedback.
Replies: 4 comments
-
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 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"
}
}
} |
Beta Was this translation helpful? Give feedback.
-
Yes, currently the follow is being utilized.
Where exactly do we place the extension configs? In the mkdocs.yml ? |
Beta Was this translation helpful? Give feedback.
-
In the same way that you enable |
Beta Was this translation helpful? Give feedback.
-
Looks as if this was the fix. Thank you for the help!!!!! Much appreciated. auto_title_map: {"S": "R"} |
Beta Was this translation helpful? Give feedback.
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:
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