diff --git a/src/themes/theme-template-color-theme.json b/src/themes/theme-template-color-theme.json index 5425078..4dbcf81 100644 --- a/src/themes/theme-template-color-theme.json +++ b/src/themes/theme-template-color-theme.json @@ -123,9 +123,9 @@ } }, { - "name": "Block Level Variables", + "name": "C-related Block Level Variables", "scope": [ - "meta.block variable.other" + "source.cpp meta.block variable.other" ], "settings": { "foreground": "{{variant.scheme.base.pink}}" diff --git a/test/source.js b/test/source.js index e69de29..4a8d015 100644 --- a/test/source.js +++ b/test/source.js @@ -0,0 +1,58 @@ +var parseXML = function (data) { + var xml, tmp; + if (!data || typeof data !== "string") { + return null; + } + try { + if (window.DOMParser) { // Standard + tmp = new DOMParser(); + xml = tmp.parseFromString(data, "text/xml"); + } else { // IE + xml = new ActiveXObject("Microsoft.XMLDOM"); + xml.async = false; + xml.loadXML(data); + } + } catch (e) { + xml = undefined; + } + if (!xml || !xml.documentElement || xml.getElementsByTagName("parsererror").length) { + jQuery.error("Invalid XML: " + data); + } + return xml; +}; + +// Bind a function to a context, optionally partially applying any arguments. +var proxy = function (fn, context) { + var tmp, args, proxy; + + if (typeof context === "string") { + tmp = fn[context]; + context = fn; + fn = tmp; + } + + // Quick check to determine if target is callable, in the spec + // this throws a TypeError, but we will just return undefined. + if (!jQuery.isFunction(fn)) { + return undefined; + } + + // Simulated bind + args = core_slice.call(arguments, 2); + proxy = function () { + return fn.apply(context || this, args.concat(core_slice.call(arguments))); + }; + + // Set the guid of unique handler to the same of original handler, so it can be removed + proxy.guid = fn.guid = fn.guid || jQuery.guid++; + + return proxy; +}; + +Sound.play = function () { } +Sound.prototype = { something; } +Sound.prototype.play = function () { } +Sound.prototype.play = myfunc +var parser = document.createElement('a'); +parser.href = "http://example.com:3000/pathname/?search=test#hash"; +parser.hostname; // => "example.com" \ No newline at end of file diff --git a/themes/Material-Theme-Darker.json b/themes/Material-Theme-Darker.json index 995a56b..f0742a6 100644 --- a/themes/Material-Theme-Darker.json +++ b/themes/Material-Theme-Darker.json @@ -123,9 +123,9 @@ } }, { - "name": "Block Level Variables", + "name": "C-related Block Level Variables", "scope": [ - "meta.block variable.other" + "source.cpp meta.block variable.other" ], "settings": { "foreground": "#f07178" diff --git a/themes/Material-Theme-Default.json b/themes/Material-Theme-Default.json index 84e76e8..e9bf300 100644 --- a/themes/Material-Theme-Default.json +++ b/themes/Material-Theme-Default.json @@ -123,9 +123,9 @@ } }, { - "name": "Block Level Variables", + "name": "C-related Block Level Variables", "scope": [ - "meta.block variable.other" + "source.cpp meta.block variable.other" ], "settings": { "foreground": "#f07178" diff --git a/themes/Material-Theme-Lighter.json b/themes/Material-Theme-Lighter.json index 42d636a..caf7104 100644 --- a/themes/Material-Theme-Lighter.json +++ b/themes/Material-Theme-Lighter.json @@ -123,9 +123,9 @@ } }, { - "name": "Block Level Variables", + "name": "C-related Block Level Variables", "scope": [ - "meta.block variable.other" + "source.cpp meta.block variable.other" ], "settings": { "foreground": "#FF5370" diff --git a/themes/Material-Theme-Palenight.json b/themes/Material-Theme-Palenight.json index 8192d84..80aed85 100644 --- a/themes/Material-Theme-Palenight.json +++ b/themes/Material-Theme-Palenight.json @@ -123,9 +123,9 @@ } }, { - "name": "Block Level Variables", + "name": "C-related Block Level Variables", "scope": [ - "meta.block variable.other" + "source.cpp meta.block variable.other" ], "settings": { "foreground": "#f07178"