@@ -52,10 +52,10 @@ def _get_bad_ticks_message(code_block: _parsing.CodeBlock) -> str | None:
52
52
log .trace ("Language specifier issue found; appending additional instructions." )
53
53
54
54
# The first line has double newlines which are not desirable when appending the msg.
55
- addition_msg = addition_msg .replace ("\n \n " , " " , 1 )
55
+ addition_msg = addition_msg .replace ("\n \n " , " " , 1 ). strip ()
56
56
57
57
# Make the first character of the addition lower case.
58
- instructions += "\n \n Furthermore , " + addition_msg [0 ].lower () + addition_msg [1 :]
58
+ instructions += "\n \n Also , " + addition_msg [0 ].lower () + addition_msg [1 :]
59
59
else :
60
60
log .trace ("No issues with the language specifier found." )
61
61
@@ -106,10 +106,8 @@ def _get_bad_lang_message(content: str) -> str | None:
106
106
example_blocks = _get_example (language )
107
107
108
108
# Note that _get_bad_ticks_message expects the first line to have two newlines.
109
- return (
110
- f"It looks like you incorrectly specified a language for your code block.\n \n { lines } "
111
- f"\n \n **Here is an example of how it should look:**\n { example_blocks } "
112
- )
109
+ return f"\n \n { lines } \n \n **Here is an example of how it should look:**\n { example_blocks } "
110
+
113
111
log .trace ("Nothing wrong with the language specifier; no instructions to return." )
114
112
return None
115
113
@@ -126,7 +124,7 @@ def _get_no_lang_message(content: str) -> str | None:
126
124
example_blocks = _get_example ("py" )
127
125
128
126
# Note that _get_bad_ticks_message expects the first line to have two newlines.
129
- return f"Please add a `py` after the three backticks.\n \n { example_blocks } "
127
+ return f"\n \n Add a `py` after the three backticks.\n \n { example_blocks } "
130
128
131
129
log .trace ("Aborting missing language instructions: content is not Python code." )
132
130
return None
0 commit comments