Kristofy commited on
Commit
fb881f2
1 Parent(s): 45a9c9f

escape line in code format

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -219,7 +219,7 @@ def str_to_md(text):
219
 
220
  lines = text.split('\n')
221
  lines = [escape_hash(line) for line in lines]
222
- return ' \n'.join(lines)
223
 
224
  def text_to_text_generation(verbose, prompt):
225
  prompt = prompt.strip()
 
219
 
220
  lines = text.split('\n')
221
  lines = [escape_hash(line) for line in lines]
222
+ return ' \n'.join(l if not all(c == '-' for c in l) else '-'*len(l) for l in lines)
223
 
224
  def text_to_text_generation(verbose, prompt):
225
  prompt = prompt.strip()