Skip to content

Commit

Permalink
Adding Markdown Editor (stage 2/5)
Browse files Browse the repository at this point in the history
  • Loading branch information
danfimov committed Aug 17, 2021
1 parent f4e9153 commit 2f324fb
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Python Developer/Markdown Editor/README.md
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!
23 changes: 23 additions & 0 deletions Python Developer/Markdown Editor/editor.py
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
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Repository with solutions to educational problems and educational projects from
| Hangman | Easy | Yes |
| Loan Calculator | Easy | Yes |
| Simple Banking System | Medium | Yes |
| Markdown Editor | Medium | No |
| Text-Based Browser | Hard | Yes |
| HyperJob Agency | Challenging | No |

Expand Down

0 comments on commit 2f324fb

Please sign in to comment.