/usr/share/yelp-xsl/js/jquery.syntax.brush.basic.js is in yelp-xsl 3.10.1-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 | // brush: "basic" aliases: ['vb']
// This file is part of the "jQuery.Syntax" project, and is distributed under the MIT License.
// Copyright (c) 2011 Samuel G. D. Williams. <http://www.oriontransfer.co.nz>
// See <jquery.syntax.js> for licensing details.
Syntax.lib.vbStyleComment = {pattern: /' .*$/gm, klass: 'comment', allow: ['href']};
Syntax.register('basic', function(brush) {
var keywords = ["AddHandler", "AddressOf", "Alias", "And", "AndAlso", "Ansi", "As", "Assembly", "Auto", "ByRef", "ByVal", "Call", "Case", "Catch", "Declare", "Default", "Delegate", "Dim", "DirectCast", "Do", "Each", "Else", "ElseIf", "End", "Enum", "Erase", "Error", "Event", "Exit", "Finally", "For", "Function", "Get", "GetType", "GoSub", "GoTo", "Handles", "If", "Implements", "Imports", "In", "Inherits", "Interface", "Is", "Let", "Lib", "Like", "Loop", "Mod", "Module", "MustOverride", "Namespace", "New", "Next", "Not", "On", "Option", "Optional", "Or", "OrElse", "Overloads", "Overridable", "Overrides", "ParamArray", "Preserve", "Property", "RaiseEvent", "ReadOnly", "ReDim", "REM", "RemoveHandler", "Resume", "Return", "Select", "Set", "Static", "Step", "Stop", "Structure", "Sub", "SyncLock", "Then", "Throw", "To", "Try", "TypeOf", "Unicode", "Until", "When", "While", "With", "WithEvents", "WriteOnly", "Xor", "ExternalSource", "Region", "Print", "Class"];
var operators = ["-", "&", "&=", "*", "*=", "/", "/=", "\\", "\=", "^", "^=", "+", "+=", "=", "-="];
var types = ["CBool", "CByte", "CChar", "CDate", "CDec", "CDbl", "Char", "CInt", "CLng", "CObj", "Const", "CShort", "CSng", "CStr", "CType", "Date", "Decimal", "Variant", "String", "Short", "Long", "Single", "Double", "Object", "Integer", "Boolean", "Byte", "Char"];
var operators = ["+", "-", "*", "/", "+=", "-=", "*=", "/=", "=", ":=", "==", "!=", "!", "%", "?", ">", "<", ">=", "<=", "&&", "||", "&", "|", "^", ".", "~", "..", ">>", "<<", ">>>", "<<<", ">>=", "<<=", ">>>=", "<<<=", "%=", "^=", "@"];
var values = ["Me", "MyClass", "MyBase", "super", "True", "False", "Nothing", /[A-Z][A-Z0-9_]+/g];
var access = ["Public", "Protected", "Private", "Shared", "Friend", "Shadows", "MustInherit", "NotInheritable", "NotOverridable"];
brush.push(types, {klass: 'type'});
brush.push(keywords, {klass: 'keyword', options: 'gi'});
brush.push(operators, {klass: 'operator'});
brush.push(access, {klass: 'access'});
brush.push(values, {klass: 'constant'});
brush.push(Syntax.lib.decimalNumber);
// ClassNames (CamelCase)
brush.push(Syntax.lib.camelCaseType);
brush.push(Syntax.lib.vbStyleComment);
brush.push(Syntax.lib.webLink);
// Strings
brush.push(Syntax.lib.doubleQuotedString);
brush.push(Syntax.lib.stringEscape);
brush.postprocess = function (options, html, container) {
var queryURI = "http://social.msdn.microsoft.com/Search/en-us?query=";
jQuery('.function', html).each(function() {
var text = jQuery(this).text();
jQuery(this).replaceWith(jQuery('<a>').attr('href', queryURI + encodeURIComponent(text)).text(text));
});
return html;
};
});
|