@@ -117,6 +117,8 @@ def __init__(self, master, **kwargs):
117
117
118
118
# Bind mouse/key events to functions.
119
119
self .text_area .bind ("<<Modified>>" , self .on_input_change )
120
+ self .text_area .edit_modified (0 )#resets the text widget to generate another event when another change occours
121
+
120
122
self .text_area .bind_all ("<Control-f>" , self .find )
121
123
self .text_area .bind_all ("<Control-a>" , self .select_all )
122
124
self .text_area .bind ("<Button-3>" , self .popup )
@@ -208,7 +210,7 @@ def on_input_change(self, event):
208
210
self .preview_area .load_html (html )
209
211
# self.preview_area.add_css("body {background-color: #272822; color: white;}")
210
212
self .check_markdown (start = "1.0" , end = END )
211
- self .text_area .edit_modified (0 )
213
+ self .text_area .edit_modified (0 )#resets the text widget to generate another event when another change occours
212
214
213
215
def load_style (self , stylename ):
214
216
"""Load Pygments style for syntax highlighting within the editor."""
@@ -271,4 +273,4 @@ class Lexer(MarkdownLexer):
271
273
bygroups (Generic .StrongEmph )))
272
274
# # bold-italic fenced by '___'
273
275
tokens ['inline' ].insert (2 , (r'(\_\_\_[^_ \n][^_\n]*\_\_\_)' ,
274
- bygroups (Generic .StrongEmph )))
276
+ bygroups (Generic .StrongEmph )))
0 commit comments