@@ -718,13 +718,13 @@ def set_editor(self, editor):
718718 self ._editor = editor
719719
720720
721- def validate_and_update (self , data , text ):
721+ def validate_and_update (self , data , text , lang = 'en' ):
722722
723723 try :
724724 from robot .parsing .parser .parser import get_model # RF > 4.0
725725 except ImportError :
726726 return self ._old_validate_and_update (data , text )
727- return self ._new_validate_and_update (data , text )
727+ return self ._new_validate_and_update (data , text , lang )
728728
729729 """
730730 Backwards compatible code v1.7.4.2
@@ -746,12 +746,13 @@ def _old_validate_and_update(self, data, text):
746746
747747 def _old_sanity_check (self , data , text ):
748748 formatted_text = data .format_text (text )
749+ # print(f"DEBUG: texteditor old_sanity_check {formatted_text=}")
749750 c = self ._normalize (formatted_text )
750751 e = self ._normalize (text )
751752 return len (c ) == len (e )
752753
753754 @staticmethod
754- def _normalize (self , text ):
755+ def _normalize (text ):
755756 for item in [' ' , r'\t' , r'\n' , r'\r\n' , '...' , '*' ]:
756757 if item in text :
757758 # print("DEBUG: _normaliz item %s txt %s" % (item, text))
0 commit comments