--- /dev/null
+/* This file is part of NIT ( http://www.nitlanguage.org ).\r
+\r
+ Licensed under the Apache License, Version 2.0 (the "License");\r
+ you may not use this file except in compliance with the License.\r
+ You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+ Unless required by applicable law or agreed to in writing, software\r
+ distributed under the License is distributed on an "AS IS" BASIS,\r
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ See the License for the specific language governing permissions and\r
+ limitations under the License.\r
+\r
+ Documentation generator for the nit language.\r
+ Generate API documentation in HTML format from nit source code.\r
+*/\r
+\r
+/*\r
+ * Utils module\r
+ */\r
+define([\r
+ "jquery",\r
+], function($) {\r
+\r
+ // JQuery Case Insensitive :icontains selector\r
+ $.expr[':'].icontains = function(obj, index, meta, stack){\r
+ return (obj.textContent.replace(/\[[0-9]+\]/g, "") || obj.innerText.replace(/\[[0-9]+\]/g, "") || jQuery(obj).text().replace(/\[[0-9]+\]/g, "") || '').toLowerCase().indexOf(meta[3].toLowerCase()) >= 0;\r
+ };\r
+\r
+ return {\r
+ // Extract anchor part (after #) from URL string\r
+ extractAnchor: function(url) {\r
+ var index = url.indexOf("#");\r
+ if (index >= 0) {\r
+ return url.substring(index + 1);\r
+ }\r
+ return null;\r
+ }\r
+ };\r
+});\r