ProjectWeb/Html5ToJsConverter.py

branch
eric7
changeset 54
1b47d2b39f7c
parent 52
815847f3d404
child 56
d91d613bba96
--- a/ProjectWeb/Html5ToJsConverter.py	Sat Dec 23 17:17:08 2023 +0100
+++ b/ProjectWeb/Html5ToJsConverter.py	Sat Oct 26 17:37:43 2024 +0200
@@ -68,7 +68,7 @@
         @return JavaScript text
         @rtype str
         """
-        dlg = Html5ToJsConverterParameterDialog()
+        dlg = Html5ToJsConverterParameterDialog(parent=self.parent())
         if dlg.exec() == QDialog.DialogCode.Accepted:
             indentation, scriptTags = dlg.getData()
 
@@ -97,9 +97,11 @@
                         re.sub(
                             "[^a-z0-9]",
                             "",
-                            id_[1].lower()
-                            if len(id_[1]) < 11
-                            else re.sub("[aeiou]", "", id_[1].lower()),
+                            (
+                                id_[1].lower()
+                                if len(id_[1]) < 11
+                                else re.sub("[aeiou]", "", id_[1].lower())
+                            ),
                         ),
                         " = ",
                         '$("#{0}").length'.format(id_[1]),
@@ -122,9 +124,11 @@
                         re.sub(
                             "[^a-z0-9]",
                             "",
-                            class_[1].lower()
-                            if len(class_[1]) < 11
-                            else re.sub("[aeiou]", "", class_[1].lower()),
+                            (
+                                class_[1].lower()
+                                if len(class_[1]) < 11
+                                else re.sub("[aeiou]", "", class_[1].lower())
+                            ),
                         ),
                         " = ",
                         '$(".{0}").length'.format(class_[1]),

eric ide

mercurial