Skip to content

Commit

Permalink
Update the help text.
Browse files Browse the repository at this point in the history
  • Loading branch information
GordonZhang2024 committed May 26, 2024
1 parent 4cddb94 commit c89aee1
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 7 deletions.
18 changes: 12 additions & 6 deletions src/converter.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@

"""
Module converter
Convert Markdown to HTML
===============
Convert Markdown to HTML.
"""

import re
Expand Down Expand Up @@ -33,9 +35,10 @@


def convert(markdown: str, preview=False, file_path='./') -> str:
"""
"""\
Function convert()
Convert Markdown to HTML
==================
Convert Markdown to HTML.
"""
global path
path = file_path
Expand All @@ -47,7 +50,8 @@ def convert(markdown: str, preview=False, file_path='./') -> str:
def convert_str(markdown: list, preview=False, file_path='./') -> str:
"""
Function convert_str()
Convert Markdown to HTML
======================
Convert Markdown(split by lines) to HTML.
"""

html = ''
Expand Down Expand Up @@ -146,16 +150,18 @@ def convert_code(text: str) -> str:
def convert_single_line(line: str) -> str:
"""
Function convert_single_line()
Convert single-line Markdown to HTML
==============================
Convert single-line Markdown to HTML.
"""

global need_br_tag
need_br_tag = True # if the line need a '<br>' tag at the end.
have_style = True # if there is a style.

while have_style: # loop(because there will possibly be nested styles)
# find a style and convert it to html
have_style = False

# find a style and convert it to html
head = re.match(r'#+\s', line)
if head:
head = str(head.group(0))
Expand Down
5 changes: 4 additions & 1 deletion src/editor.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
#!/usr/bin/env python3

"""
module main
Module editor
=============
The main program of tkMarker
"""
import ttkbootstrap as ttk
Expand Down Expand Up @@ -208,6 +210,7 @@ def new_file():

if __name__ == '__main__':
# Init
# This is the starting point of everything. :)
home = os.path.expanduser('~')
global file_uuid
file_uuid = uuid.uuid1()
Expand Down

0 comments on commit c89aee1

Please sign in to comment.