def expand(string, start, end, extension="", settings=None): if(re.compile("html|htm|xml").search(extension)): result = html.expand(string, start, end) else: result = javascript.expand(string, start, end) if (result != None and settings): expand_region_settings = settings.get("expand_region_settings") newSettingsJson = add_to_stack(expand_region_settings, string.encode('utf-8'), result.get("start"), result.get("end"), start, end) print(newSettingsJson) settings.set("expand_region_settings", newSettingsJson) return result;
def expand(string, start, end, language="", settings=None): if language == "html": result = html.expand(string, start, end) elif language == "latex": result = latex.expand(string, start, end) elif language == "python": result = python.expand(string, start, end) else: result = javascript.expand(string, start, end) if (result != None and settings): expand_region_settings = settings.get("expand_region_settings") newSettingsJson = add_to_stack(expand_region_settings, string.encode('utf-8'), result.get("start"), result.get("end"), start, end) if utils.is_debug_enabled: print("ExpandRegion, expand_region_handler.py, " + newSettingsJson) settings.set("expand_region_settings", newSettingsJson) return result
def expand(string, start, end, extension=None): if(re.compile("html|htm|xml").search(extension)): return html.expand(string, start, end) return javascript.expand(string, start, end)