lib/jekyll-chatgpt-translate/plain.rb in jekyll-chatgpt-translate-0.0.16 vs lib/jekyll-chatgpt-translate/plain.rb in jekyll-chatgpt-translate-0.0.17
- old
+ new
@@ -72,9 +72,11 @@
end
def codespan(content)
if content.start_with?("\n")
"```#{content}```"
+ elsif content.end_with?("\n")
+ "```\n#{content.split("\n", 2)[1]}```"
else
content
end
end