diff options
| author | 2020-05-06 14:24:49 -0700 | |
|---|---|---|
| committer | 2020-06-13 11:21:06 -0700 | |
| commit | 30967602e2faabb6654d30c1fc7e1c4f4e3d2919 (patch) | |
| tree | 8e2d1e441d3f54643b6db758e88bcdd3ba5386f5 | |
| parent | Code block: fix missing space between words in message (diff) | |
Code block: fix formatting of the additional message
The newlines should be replaced with a space rather than with 1 newline.
To separate the two issues, a double newline is prepended to the entire
additional message.
| -rw-r--r-- | bot/cogs/codeblock/instructions.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bot/cogs/codeblock/instructions.py b/bot/cogs/codeblock/instructions.py index 0f05e68b1..dec5af874 100644 --- a/bot/cogs/codeblock/instructions.py +++ b/bot/cogs/codeblock/instructions.py @@ -34,10 +34,10 @@ def get_bad_ticks_message(code_block: parsing.CodeBlock) -> Optional[str]: # already have an example code block. if addition_msg: # The first line has a double line break which is not desirable when appending the msg. - addition_msg = addition_msg.replace("\n\n", "\n", 1) + addition_msg = addition_msg.replace("\n\n", " ", 1) # Make the first character of the addition lower case. - instructions += "Furthermore, " + addition_msg[0].lower() + addition_msg[1:] + instructions += "\n\nFurthermore, " + addition_msg[0].lower() + addition_msg[1:] else: # Determine the example code to put in the code block based on the language specifier. if code_block.language.lower() in PY_LANG_CODES: |