We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 76b1ddd commit 0cab09cCopy full SHA for 0cab09c
1 file changed
src/emc/ini/update_ini.py
@@ -435,7 +435,7 @@ def ini_preamble():
435
inistring, newini, all_sections = ini_preamble()
436
437
all_sections.remove("DISPLAY")
438
- section = re.search(r"\[DISPLAY\](.+?\n)(?=\[)", inistring, re.DOTALL)
+ section = re.search(r"(?:^|\n)[ \t]*(?!#)\[DISPLAY\](.+?\n)(?=\[|$)", inistring, re.DOTALL)
439
440
if section: section = section.group(1)
441
newini.write("\n[DISPLAY]")
@@ -467,7 +467,7 @@ def ini_preamble():
467
# move [TRAJ]MIN_LINEAR_VELOCITY -> [DISPLAY]MIN_LINEAR_VELOCITY
468
# rename [TRAJ, DISPLAY]MIN_VELOCITY --> MIN_LINEAR_VELOCITY
469
# copy [TRAJ]MAX_LINEAR_VELOCITY -> [DISPLAY]MAX_LINEAR_VELOCITY
470
-
+
471
#These sections don't need any work.
472
copysection("FILTER")
473
copysection("RS274NGC")
0 commit comments