-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
33 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Markdown Editor | ||
|
||
## About | ||
|
||
Markdown is a special plain text formatting language that is extremely popular among developers. It is used in documents, research articles, Github README files, and other things. In this project, you will write an editor that will be able to recognize several tags, structures, and save your results to a file. | ||
|
||
## Learning outcomes | ||
|
||
Practice list operations, file handling, functions, scopes, and a lot of other things. Make a handy and useful tool that uses the markdown language! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
def choose(): | ||
formatters = ['plain', 'bold', 'italic', 'header', 'link', 'inline-code', 'ordered-list', | ||
'unordered-list', 'new-line'] | ||
|
||
formatter = input('Choose a formatter: ') | ||
|
||
if formatter == '!done': | ||
return True | ||
|
||
if formatter == '!help': | ||
print('Available formatters: plain bold italic header\ | ||
link inline-code ordered-list unordered-list new-line') | ||
print('Special commands: !help !done') | ||
return False | ||
|
||
if formatter not in formatters: | ||
print('Unknown formatting type or command') | ||
return False | ||
|
||
|
||
while True: | ||
if choose(): | ||
break |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters