Skip to content

Commit

Permalink
Merge pull request #145 from BinghamChi/master
Browse files Browse the repository at this point in the history
新增无序列表显示层级关系
  • Loading branch information
DeppWang authored Jun 27, 2024
2 parents 8ebfd39 + e6ba943 commit a2e9770
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion core/covert.py
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,8 @@ def convert_l_func(self, content):
text = self._get_common_text(content=content)
is_ordered = content.get("4").get("lt")
if is_ordered == "unordered":
return "- {text}".format(text=text)
level = content.get("4").get("ll")
return "\t" * (level - 1) + "- {text}".format(text=text)
elif is_ordered == "ordered":
# 有序列表都设置为 1,有些 MD 编辑自动转为有序列表
return "1. {text}".format(text=text)
Expand Down

0 comments on commit a2e9770

Please sign in to comment.