ruff_python_formatter: add test for extraneous info string text#9050
ruff_python_formatter: add test for extraneous info string text#9050BurntSushi merged 1 commit intomainfrom
Conversation
@ofek asked [about this][ref]. I did specifically add support for it, but neglected to add a test. This PR adds a test. [ref]: #9030 (comment)
|
Awesome, thank you! |
|
MichaReiser
left a comment
There was a problem hiding this comment.
TIL that you can have additional text after the language specifier
|
Not in pure Markdown but extensions do support that frequently to do various things! |
Assuming pure Markdown is CommonMark, the extra text after the opening fences is called the "info string" and it does indeed permit for pretty much anything to go there. There are even examples in the spec. See: https://spec.commonmark.org/0.30/#fenced-code-blocks The spec doesn't attach any semantic value to any part of the "info string," it just specifies what is allowed there. For example, when using backticks for a fenced code block, the info string itself cannot contain backticks. But it can if you use tildes! |
@ofek asked about this. I did specifically add support for it, but neglected to add a test. This PR adds a test.