@@ -59,17 +59,17 @@ def __init__(self, master, **kwargs):
59
59
self .paste_btn .pack (side = "left" , padx = 0 , pady = 0 )
60
60
self .find_btn = tk .Button (self .top_bar , text = "Find" , command = self .find )
61
61
self .find_btn .pack (side = "left" , padx = 0 , pady = 0 )
62
- self .bold_btn = tk .Button (self .top_bar , text = "Bold" , command = lambda : self . apply_markdown_both_sides ( constants . bold_md_syntax ) )
63
- self .bold_btn .pack (side = "left" , padx = 0 , pady = 0 )
64
- self .italic_btn = tk .Button (self .top_bar , text = "Italic" , command = lambda : self . apply_markdown_both_sides ( constants . italic_md_syntax ) )
65
- self .italic_btn .pack (side = "left" , padx = 0 , pady = 0 )
66
- # Currently has issues, needs constants adjusting.
62
+ # self.bold_btn = tk.Button(self.top_bar, text="Bold")
63
+ # self.bold_btn.pack(side="left", padx=0, pady=0)
64
+ # self.italic_btn = tk.Button(self.top_bar, text="Italic")
65
+ # self.italic_btn.pack(side="left", padx=0, pady=0)
66
+ # # Currently has issues, needs constants adjusting.
67
67
self .bold_italic_btn = tk .Button (self .top_bar , text = "Bold Italic" , command = lambda : self .check_bold_italic (constants .bold_italic_md_syntax , constants .bold_italic_md_ignore ))
68
68
self .bold_italic_btn .pack (side = "left" , padx = 0 , pady = 0 )
69
69
# self.heading_btn = tk.Button(self.top_bar, text="Heading")
70
70
# self.heading_btn.pack(side="left", padx=0, pady=0)
71
- self .strikethrough_btn = tk .Button (self .top_bar , text = "Strikethrough" , command = lambda : self . apply_markdown_both_sides ( constants . strikethrough_md_syntax ) )
72
- self .strikethrough_btn .pack (side = "left" , padx = 0 , pady = 0 )
71
+ # self.strikethrough_btn = tk.Button(self.top_bar, text="Strikethrough")
72
+ # self.strikethrough_btn.pack(side="left", padx=0, pady=0)
73
73
# self.unordered_list_btn = tk.Button(self.top_bar, text="Unordered List")
74
74
# self.unordered_list_btn.pack(side="left", padx=0, pady=0)
75
75
# self.ordered_list_btn = tk.Button(self.top_bar, text="Ordered List")
@@ -380,9 +380,8 @@ def check_bold_italic(self, md_syntax, md_ignore):
380
380
self .md_ignore = md_ignore
381
381
self .cur_selection = self .text_area .selection_get ()
382
382
# Ignore items in the md_ignore variable and then deal with bold and
383
- # italic syntax individually.
384
- # If string starts with anything in md_ignore do nothing and return from
385
- # the function.
383
+ # italic syntax individually. If string starts with anything in
384
+ # md_ignore do nothing and return from the function.
386
385
if str (self .cur_selection ).startswith (self .md_ignore ):
387
386
return
388
387
# If the string already has bold or italic formatting and doesnt start
0 commit comments