Skip to content

Commit 79d29d6

Browse files
committed
qtvcp -gcode editor: more highlighting fixes
Thank you MarkoPolo
1 parent 14456bc commit 79d29d6

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

lib/python/qtvcp/widgets/gcode_editor.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -115,10 +115,10 @@ def styleText(self, start, end):
115115

116116
re_tokens = {
117117
1: r"(?:[N]\d+|\(.*?\)|;.*)", # LineNo and Comment
118-
2: r"[G]\d{1,2}\.\d|[G]\d{1,2}", # Gcode
119-
3: r"[M]\d{1,3}", # Mcode
120-
4: r"[XYZABCUVW]{1}(?:[+-]?[\d\.\s]+|\#\<.*\>|\[.*\]|\#\d+)", # Axis
121-
5: r"[EFHIJKDQLRPST$]{1}(?:[+-]?[\d\.]+|\#\<.*\>|\[.*\]|\#\d+)", # Other (feed,rpm,radius,etc)
118+
2: r"[G]\s*\d{1,2}\.\d\s|[G]\s*\d{1,2}", # Gcode
119+
3: r"[M]\s*\d{1,3}", # Mcode
120+
4: r"[XYZABCUVW]{1}(?:[+-]?[\d\.\s\][+-]+|\#\<.*\>|\[.*\]|\#\d+)", # Axis
121+
5: r"[EFHIJKDQLRPST$]{1}(?:[+-]?[\d\.\s]+|\#\<.*\>|\[.*\]|\#\d+)", # Other (feed,rpm,radius,etc)
122122
0: r"\s+|\w+|\W", # Default (fallback)
123123
}
124124

@@ -1216,3 +1216,4 @@ def reset_auto_show_manual(self):
12161216
w.label.setText('<b>Edit mode title label</b>')
12171217
w.show()
12181218
sys.exit( app.exec_() )
1219+

0 commit comments

Comments
 (0)