diff --git a/SalesforceReference.py b/SalesforceReference.py index c9d07e8..bac45a6 100644 --- a/SalesforceReference.py +++ b/SalesforceReference.py @@ -1,7 +1,7 @@ """SublimeSalesforceReference: Quick access to Salesforce Documentation from Sublime Text""" -__version__ = "2.1.0" +__version__ = "2.1.1" __author__ = "James Hill " -__copyright__ = "SublimeSalesforceReference: (C) 2014-2015 James Hill. GNU GPL 3." +__copyright__ = "SublimeSalesforceReference: (C) 2014-2017 James Hill. GNU GPL 3." __credits__ = ["All Salesforce Documentation is © Copyright 2000–2015 salesforce.com, inc.", "ThreadProgress.py is under the MIT License, Will Bond , and SalesforceReference.py's RetrieveIndexThread method is a derives in part from code under the same license"] import sublime, sublime_plugin diff --git a/messages.json b/messages.json index 9823b2e..03b407c 100644 --- a/messages.json +++ b/messages.json @@ -10,5 +10,6 @@ "2.0.0": "messages/2.0.0.txt", "2.0.1": "messages/2.0.1.txt", "2.0.2": "messages/2.0.2.txt", - "2.1.0": "messages/2.1.0.txt" + "2.1.0": "messages/2.1.0.txt", + "2.1.1": "messages/2.1.1.txt" } diff --git a/messages/2.1.1.txt b/messages/2.1.1.txt new file mode 100644 index 0000000..0e611d6 --- /dev/null +++ b/messages/2.1.1.txt @@ -0,0 +1,4 @@ +Sublime Salesforce Reference 2.1.1 Release Notes: + +Bug Fixes: + - Updated Apex retrieval to handle Salesforce's new Apex ToC format (as at 2017-06-30) diff --git a/salesforce_reference/retrieve.py b/salesforce_reference/retrieve.py index 9808315..fc86d50 100644 --- a/salesforce_reference/retrieve.py +++ b/salesforce_reference/retrieve.py @@ -82,7 +82,8 @@ def run(self): sf_document = urllib.request.urlopen(urllib.request.Request(DocTypeEnum.APEX.toc_url,None,{"User-Agent": "Mozilla/5.0"})).read().decode("utf-8") sf_json = json.loads(sf_document) sf_toc = sf_json["toc"] - reference_toc = filter(lambda x: "id" in x and x["id"] == "apex_reference", sf_toc) + dev_guide_toc = next(filter(lambda x: "id" in x and x["id"] == "apex_dev_guide", sf_toc)) + reference_toc = filter(lambda x: "id" in x and x["id"] == "apex_reference", dev_guide_toc["children"]) for toc_entry in getAllTocLeafParents(next(reference_toc),None): with self.cache_lock: self.cache.append(