Closed ccwang002 closed 2 years ago
I made a few tweaks to adjust some awkward wording. Also, I altered the example to use the extension class directly rather than using the string name. While both ways are supported, we recommend users use the Python objects. Therefore, our documentation should reflect that.
Otherwise, this looks good to me.
Nice. Thanks for the feedback and review 👍
As per the discussions in PR #1255, I add a new option
lang_str
that passes the language of a code block to the specified Pygments formatter.lang_str
has the value of{lang_prefix}{lang}
, so it respects the existing language prefix option.While
lang_str
has no effect the builtin Pygments formatters, users can leverage this information in their custom formatter to annotate the generated output.An example I added to the documentation annotates the language as a class of the
<code>
tag. I copied it below:The formatter above will output the following HTML structure for the code block: