Release preparation, documentation, fixing vc bugs
diff --git a/dev/js/src/hint/contextanalyzer.js b/dev/js/src/hint/contextanalyzer.js
index bdbf885..fc01662 100644
--- a/dev/js/src/hint/contextanalyzer.js
+++ b/dev/js/src/hint/contextanalyzer.js
@@ -2,9 +2,15 @@
* Regex object for checking the context of the hint
*/
define({
+
+ /**
+ * Create analyzer based on regular expression.
+ */
create : function (regex) {
return Object.create(this)._init(regex);
},
+
+ // Initialize analyzer
_init : function (regex) {
try {
this._regex = new RegExp(regex);
@@ -15,6 +21,11 @@
};
return this;
},
+
+ /**
+ * Check a context based on the analyzer
+ * and return a valid context string.
+ */
test : function (text) {
if (!this._regex.exec(text))
return;