anchor.diff:  
   (function($) {
     var AceMode = {
  -    asciidoc: 'GollumAsciidocHighlightRules',
  -    creole: 'text',
  -    markdown: 'GollumMarkdownHighlightRules',
  -    mediawiki: 'text',
  -    bib: 'latex',
  -    org: 'text',
  -    rst: 'GollumRstHighlightRules',
  -    txt: 'text',
  -    pod: 'text',
  -    rdoc: 'rdoc',
  -    textile: 'GollumTextileHighlightRules'
  +    asciidoc: {
  +      mode: 'asciidoc',
  +      highlighter: 'GollumAsciidocHighlightRules'
  +    },
  +    creole: {
  +      mode: 'text',
  +      highlighter: 'GollumTextHighlightRules'
  +    },
  +    markdown: {
  +      mode: 'markdown',
  +      highlighter: 'GollumMarkdownHighlightRules'
  +    },
  +    mediawiki: {
  +      mode: 'text',
  +      highlighter: 'GollumTextHighlightRules'
  +    },
  +    bib: {
  +      mode: 'latex'
  +    },
  +    org: {
  +      mode: 'text',
  +      highlighter: 'GollumTextHighlightRules'
  +    },
  +    rst: {
  +      mode: 'rst',
  +      highlighter: 'GollumRstHighlightRules'
  +    },
  +    txt: {
  +      mode: 'text'
  +    },
  +    pod: {
  +      mode: 'text',
  +      highlighter: 'GollumTextHighlightRules'
  +    },
  +    rdoc: {
  +      mode: 'rdoc',
  +      highlighter: 'GollumRdocHighlightRules'
  +    },
  +    textile: {
  +      mode: 'textile',
  +      highlighter: 'GollumTextileHighlightRules'
  +    }
     };
   
     $.getEditorMode = function ( mode ) {
  -    var ace_mode = '';
  -    if (ace_mode = AceMode[mode]) {
  -      if (ace_mode.startsWith('Gollum')){ // We have extended highlighters
  -        var baseMode = ace.require("ace/mode/" + mode).Mode;
  +    var lang = null;
  +    if (lang = AceMode[mode]) {
  +      var ace_mode = lang['mode'];
  +      var gollum_rules = lang['highlighter'];
  +      if (gollum_rules){ // We have extended highlighters
  +        var baseMode = ace.require("ace/mode/" + ace_mode).Mode;
           var dynamicMode = new baseMode();
  -        dynamicMode.HighlightRules = ace.require(ace_mode).GollumHighlightRules;
  +        dynamicMode.HighlightRules = ace.require(gollum_rules).GollumHighlightRules;
           return dynamicMode;      
         } else {
           return "ace/mode/" + ace_mode;
  
positive.code: textile_rules[:path] = 'ace/mode/textile_highlight_rules'
  textile_rules[:rule_name] = 'TextileHighlightRules'
  
  markdown_rules = default_rules.dup
  markdown_rules[:path] = 'ace/mode/markdown_highlight_rules'
  markdown_rules[:rule_name] = 'MarkdownHighlightRules'
  markdown_rules[:start_rules] = ['GollumCodeStart', 'UMLStart', 'MarkdownCodeStart'] # Markdown pages should also support fenced code blocks
  
  
  {
    'GollumRstHighlightRules'      => rst_rules,
    'GollumAsciidocHighlightRules' => asciidoc_rules,
    'GollumTextileHighlightRules'  => textile_rules,
    'GollumMarkdownHighlightRules' => markdown_rules 
  }.each do |name, highlighter|
  %>
  
negative.code: rst_rules[:rule_name] = 'RSTHighlightRules'
  
  asciidoc_rules = default_rules.dup
  asciidoc_rules[:start_rules] = ['UMLStart', 'GollumCodeStart'] # Gollum tags are disabled for asciidoc
  asciidoc_rules[:path] = 'ace/mode/asciidoc_highlight_rules'
  asciidoc_rules[:rule_name] = 'AsciidocHighlightRules'
  
  