diff options
author | Xavier Noria <fxn@hashref.com> | 2010-04-04 02:30:31 -0700 |
---|---|---|
committer | Xavier Noria <fxn@hashref.com> | 2010-04-04 02:30:31 -0700 |
commit | ac8b71cc2032bd352cbe6c078bdff55b236cab8a (patch) | |
tree | 28b4aa335e89282f07987ca088c44a9b2c38a58b /railties/guides/files/javascripts/highlighters.js | |
parent | c52bec77f53a1dc4e3f61fbd45460b99f8f46fb1 (diff) | |
download | rails-ac8b71cc2032bd352cbe6c078bdff55b236cab8a.tar.gz rails-ac8b71cc2032bd352cbe6c078bdff55b236cab8a.tar.bz2 rails-ac8b71cc2032bd352cbe6c078bdff55b236cab8a.zip |
guides assets are now centralized in the assets directory, with standard subdirs
Diffstat (limited to 'railties/guides/files/javascripts/highlighters.js')
-rw-r--r-- | railties/guides/files/javascripts/highlighters.js | 90 |
1 files changed, 0 insertions, 90 deletions
diff --git a/railties/guides/files/javascripts/highlighters.js b/railties/guides/files/javascripts/highlighters.js deleted file mode 100644 index 4f5f0779d7..0000000000 --- a/railties/guides/files/javascripts/highlighters.js +++ /dev/null @@ -1,90 +0,0 @@ -CodeHighlighter.addStyle("css", { - comment : { - exp : /\/\*[^*]*\*+([^\/][^*]*\*+)*\// - }, - keywords : { - exp : /@\w[\w\s]*/ - }, - selectors : { - exp : "([\\w-:\\[.#][^{};>]*)(?={)" - }, - properties : { - exp : "([\\w-]+)(?=\\s*:)" - }, - units : { - exp : /([0-9])(em|en|px|%|pt)\b/, - replacement : "$1<span class=\"$0\">$2</span>" - }, - urls : { - exp : /url\([^\)]*\)/ - } - }); - -CodeHighlighter.addStyle("ruby",{ - comment : { - exp : /#[^\n]+/ - }, - brackets : { - exp : /\(|\)/ - }, - string : { - exp : /'[^']*'|"[^"]*"/ - }, - keywords : { - exp : /\b(do|end|self|class|def|if|module|yield|then|else|for|until|unless|while|elsif|case|when|break|retry|redo|rescue|require|raise)\b/ - }, - /* Added by Shelly Fisher (shelly@agileevolved.com) */ - symbol : { - exp : /([^:])(:[A-Za-z0-9_!?]+)/ - }, - ivar : { - exp : /\@[A-Za-z0-9_!?]+/ - } -}); - -CodeHighlighter.addStyle("html", { - comment : { - exp: /<!\s*(--([^-]|[\r\n]|-[^-])*--\s*)>/ - }, - tag : { - exp: /(<\/?)([a-zA-Z1-9]+\s?)/, - replacement: "$1<span class=\"$0\">$2</span>" - }, - string : { - exp : /'[^']*'|"[^"]*"/ - }, - attribute : { - exp: /\b([a-zA-Z-:]+)(=)/, - replacement: "<span class=\"$0\">$1</span>$2" - }, - doctype : { - exp: /<!DOCTYPE([^&]|&[^g]|&g[^t])*>/ - } -}); - -CodeHighlighter.addStyle("javascript",{ - comment : { - exp : /(\/\/[^\n]*(\n|$))|(\/\*[^*]*\*+([^\/][^*]*\*+)*\/)/ - }, - brackets : { - exp : /\(|\)/ - }, - string : { - exp : /'[^']*'|"[^"]*"/ - }, - keywords : { - exp : /\b(arguments|break|case|continue|default|delete|do|else|false|for|function|if|in|instanceof|new|null|return|switch|this|true|typeof|var|void|while|with)\b/ - }, - global : { - exp : /\b(toString|valueOf|window|element|prototype|constructor|document|escape|unescape|parseInt|parseFloat|setTimeout|clearTimeout|setInterval|clearInterval|NaN|isNaN|Infinity)\b/ - } -}); - -CodeHighlighter.addStyle("yaml", { - keyword : { - exp : /\/\*[^*]*\*+([^\/][^*]*\*+)*\// - }, - value : { - exp : /@\w[\w\s]*/ - }, -}); |