/** * SyntaxHighlighter * http://alexgorbatchev.com/SyntaxHighlighter * * SyntaxHighlighter is donationware. If you are using it, please donate. * http://alexgorbatchev.com/SyntaxHighlighter/donate.html * * @version * 3.0.83 (July 02 2010) * * @copyright * Copyright (C) 2004-2010 Alex Gorbatchev. * * @license * Dual licensed under the MIT and GPL licenses. */ ;(function() { // CommonJS typeof(require) != 'undefined' ? SyntaxHighlighter = require('shCore').SyntaxHighlighter : null; function Brush() { var my_constant = 'main'; var my_type = 'integer'; var my_keyword = 'program end'; var my_function = 'print'; this.regexList = [ { regex: SyntaxHighlighter.regexLib.singleLineCComments, css: 'comments' }, { regex: /\/\*([^\*][\s\S]*)?\*\//gm, css: 'comments' }, { regex: /\/\*(?!\*\/)\*[\s\S]*?\*\//gm, css: 'preprocessor' }, { regex: SyntaxHighlighter.regexLib.doubleQuotedString, css: 'string' }, { regex: SyntaxHighlighter.regexLib.singleQuotedString, css: 'string' }, { regex: /\b([\d]+(\.[\d]+)?|0x[a-f0-9]+)\b/gi, css: 'value' }, { regex: /(?!\@interface\b)\@[\$\w]+\b/g, css: 'color1' }, { regex: /\@interface\b/g, css: 'color2' }, { regex: new RegExp(this.getKeywords(my_type),'gm'), css:'my_type bold'}, { regex: new RegExp(this.getKeywords(my_keyword),'gm'), css:'my_keyword bold'}, { regex: new RegExp(this.getKeywords(my_constant),'gm'), css:'my_constant bold'}, { regex: new RegExp(this.getKeywords(my_function),'gm'), css:'my_function bold'}, ]; this.forHtmlScript({ left : /(<|<)%[@!=]?/g, right : /%(>|>)/g }); }; Brush.prototype = new SyntaxHighlighter.Highlighter(); Brush.aliases = ['fortran']; SyntaxHighlighter.brushes.Fortran = Brush; // CommonJS typeof(exports) != 'undefined' ? exports.Brush = Brush : null; })();