File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11"""This module generates and formats instructional messages about fixing Markdown code blocks."""
22
3+
34from bot .exts .info .codeblock import _parsing
45from bot .log import get_logger
56
67log = get_logger (__name__ )
78
89# Make sure to escape any Markdown symbols here.
910_EXAMPLE_PY = "{lang}\n print('Hello, world!')"
10- _EXAMPLE_CODE_BLOCKS = "\\ `\\ `\\ `{content}\n \\ `\\ `\\ `\n \n **This will result in the following:**\n ```{content}```"
11+ _EXAMPLE_CODE_BLOCKS = (
12+ "\\ `\\ `\\ `{content}\n \\ `\\ `\\ `\n \n
13+ **This will result in the following:**\n
14+ ```{content}```"
15+ )
1116
1217
1318def _get_example (language : str ) -> str :
@@ -33,7 +38,8 @@ def _get_bad_ticks_message(code_block: _parsing.CodeBlock) -> str | None:
3338
3439 valid_ticks = f"\\ { _parsing .BACKTICK } " * 3
3540 instructions = (
36- f"You are using the wrong character instead of backticks. Use { valid_ticks } , not `{ code_block .ticks } `."
41+ f"You are using the wrong character instead of backticks. "
42+ f"Use { valid_ticks } , not `{ code_block .ticks } `."
3743 )
3844
3945 log .trace ("Check if the bad ticks code block also has issues with the language specifier." )
You can’t perform that action at this time.
0 commit comments