Skip to content

Commit

Permalink
修正
Browse files Browse the repository at this point in the history
  • Loading branch information
YusukeKato committed Sep 22, 2024
1 parent 669388e commit 8aa3329
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions scripts/md2html.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,18 @@
version="1002"

def replace_strong(str):
strong_flag = True
for i in range(len(str)):
strong_flag = True
i = 0
while i < len(str):
if str[i] == '`' and strong_flag:
str = str[:i] + '<strong>' + str[i:]
str = str[:i] + '<strong>' + str[i+1:]
strong_flag = False
elif str[i] == '`' and not strong_flag:
str = str[:i] + '</strong>' + str[i:]
i=-1
elif str[i] == '`' and strong_flag == False:
str = str[:i] + '</strong>' + str[i+1:]
strong_flag = True
i=-1
i=i+1
return str

# markdownのファイル名を全て取得
Expand Down

0 comments on commit 8aa3329

Please sign in to comment.