selamw commited on
Commit
7da6f8a
·
verified ·
1 Parent(s): 4b81708

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -29,14 +29,13 @@ def convert_to_markdown(input_text):
29
 
30
  # Split into title and content based on the first ":", handling extra whitespace
31
  title, content = map(str.strip, input_text.split(":", 1))
32
-
33
  # Bold the keywords
34
  for word in bold_words:
35
  content = content.replace(word, f'\n**{word}**\n')
36
- content = content.replace(f' ** ', f' ')
37
 
38
  # Construct the Markdown output with headings
39
- formatted_output = f"** {title} **\n{content}"
40
 
41
  return formatted_output.strip()
42
 
 
29
 
30
  # Split into title and content based on the first ":", handling extra whitespace
31
  title, content = map(str.strip, input_text.split(":", 1))
 
32
  # Bold the keywords
33
  for word in bold_words:
34
  content = content.replace(word, f'\n**{word}**\n')
35
+ # content = content.replace(f'** ', f' ')
36
 
37
  # Construct the Markdown output with headings
38
+ formatted_output = f"**{title}{content}"
39
 
40
  return formatted_output.strip()
41