From a0eb7bdb3d74b3900c6ab1aaa72d2d5ddc8af935 Mon Sep 17 00:00:00 2001 From: Isaac Muse Date: Sun, 3 Nov 2024 22:14:01 -0700 Subject: [PATCH] Fix SINUMERIK840D IF handling (#638) --- CHANGES.md | 5 +++++ bh_core.sublime-settings | 2 +- bh_modules/s840d_hmi.py | 2 +- support.py | 2 +- 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index cc77d706..8b569813 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,5 +1,10 @@ # BracketHighlighter +## 2.32.0 + +- **NEW**: Opt in to Python 3.8. +- **FIX**: Fix issues with "SINUMERIK840D" language. + ## 2.31.5 - **FIX**: Fix endless Ruby method case. diff --git a/bh_core.sublime-settings b/bh_core.sublime-settings index 7585743c..10920f3e 100755 --- a/bh_core.sublime-settings +++ b/bh_core.sublime-settings @@ -663,7 +663,7 @@ { "name": "s840d_hmi", "open": "^\\s*(//[ABGMS]|ACTIVATE|CHANGE|FOCUS|IF|LOAD|UNLOAD|OUTPUT|PRESS|SUB)\\b", - "close": "^\\s*(//END|END_(?:ACTIVATE|CHANGE|FOCUS|IF|LOAD|UNLOAD|OUTPUT|PRESS|SUB))\\b", + "close": "^\\s*(//END|END_(?:ACTIVATE|CHANGE|FOCUS|LOAD|UNLOAD|OUTPUT|PRESS|SUB)|END(?:IF))\\b", "style": "tag", "scope_exclude": ["string", "comment"], "plugin_library": "bh_modules.s840d_hmi", diff --git a/bh_modules/s840d_hmi.py b/bh_modules/s840d_hmi.py index 8f47c05a..ab6a436a 100644 --- a/bh_modules/s840d_hmi.py +++ b/bh_modules/s840d_hmi.py @@ -19,6 +19,6 @@ def compare(name, first, second, bfr): if o in S840D_HMI_CLASSES and c == "//end": match = True # methods - elif c == "end_" + o: + elif c == "end_" + o or c == 'end' + o: match = True return match diff --git a/support.py b/support.py index 1a78f896..91cfe219 100644 --- a/support.py +++ b/support.py @@ -5,7 +5,7 @@ import webbrowser import re -__version__ = "2.31.5" +__version__ = "2.32.0" __pc_name__ = 'BracketHighlighter' CSS = '''