kalei 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (211) hide show
  1. data/MIT-LICENSE +20 -0
  2. data/README.md +34 -0
  3. data/Rakefile +39 -0
  4. data/lib/kalei.rb +3 -0
  5. data/lib/kalei/app.rb +9 -0
  6. data/lib/kalei/engine.rb +7 -0
  7. data/lib/kalei/public/css/buttons.css +251 -0
  8. data/lib/kalei/public/css/demo-styleDoccos.css +360 -0
  9. data/lib/kalei/public/css/fixie-demo.css +39 -0
  10. data/lib/kalei/public/css/highlight/LICENSE +24 -0
  11. data/lib/kalei/public/css/highlight/README.md +120 -0
  12. data/lib/kalei/public/css/highlight/README.ru.md +125 -0
  13. data/lib/kalei/public/css/highlight/classref.txt +544 -0
  14. data/lib/kalei/public/css/highlight/default.min.css +1 -0
  15. data/lib/kalei/public/css/highlight/highlight.pack.js +1 -0
  16. data/lib/kalei/public/css/highlight/styles/arta.css +153 -0
  17. data/lib/kalei/public/css/highlight/styles/ascetic.css +49 -0
  18. data/lib/kalei/public/css/highlight/styles/brown_paper.css +104 -0
  19. data/lib/kalei/public/css/highlight/styles/brown_papersq.png +0 -0
  20. data/lib/kalei/public/css/highlight/styles/dark.css +103 -0
  21. data/lib/kalei/public/css/highlight/styles/default.css +133 -0
  22. data/lib/kalei/public/css/highlight/styles/far.css +110 -0
  23. data/lib/kalei/public/css/highlight/styles/github.css +133 -0
  24. data/lib/kalei/public/css/highlight/styles/googlecode.css +143 -0
  25. data/lib/kalei/public/css/highlight/styles/idea.css +122 -0
  26. data/lib/kalei/public/css/highlight/styles/ir_black.css +99 -0
  27. data/lib/kalei/public/css/highlight/styles/magula.css +120 -0
  28. data/lib/kalei/public/css/highlight/styles/monokai.css +116 -0
  29. data/lib/kalei/public/css/highlight/styles/pojoaque.css +106 -0
  30. data/lib/kalei/public/css/highlight/styles/pojoaque.jpg +0 -0
  31. data/lib/kalei/public/css/highlight/styles/school_book.css +111 -0
  32. data/lib/kalei/public/css/highlight/styles/school_book.png +0 -0
  33. data/lib/kalei/public/css/highlight/styles/solarized_dark.css +90 -0
  34. data/lib/kalei/public/css/highlight/styles/solarized_light.css +90 -0
  35. data/lib/kalei/public/css/highlight/styles/sunburst.css +149 -0
  36. data/lib/kalei/public/css/highlight/styles/vs.css +85 -0
  37. data/lib/kalei/public/css/highlight/styles/xcode.css +153 -0
  38. data/lib/kalei/public/css/highlight/styles/zenburn.css +115 -0
  39. data/lib/kalei/public/css/styles.css +95 -0
  40. data/lib/kalei/public/css/theme.css +259 -0
  41. data/lib/kalei/public/css/theme2.css +51 -0
  42. data/lib/kalei/public/js/boilerplate.js +9 -0
  43. data/lib/kalei/public/js/config.js +8 -0
  44. data/lib/kalei/public/js/events.js +8 -0
  45. data/lib/kalei/public/js/libs/backbone/backbone-min.js +37 -0
  46. data/lib/kalei/public/js/libs/backbone/backbone-optamd3-min.js +37 -0
  47. data/lib/kalei/public/js/libs/cssbeautify/cssbeautify.js +198 -0
  48. data/lib/kalei/public/js/libs/fixie/fixie.js +1 -0
  49. data/lib/kalei/public/js/libs/highlight/highlight.js +1 -0
  50. data/lib/kalei/public/js/libs/highlight/highlight.pack.js +1 -0
  51. data/lib/kalei/public/js/libs/highlighter/shBrushCss.js +90 -0
  52. data/lib/kalei/public/js/libs/highlighter/shCore.js +2371 -0
  53. data/lib/kalei/public/js/libs/jquery/jquery-min.js +4 -0
  54. data/lib/kalei/public/js/libs/jscssp/jscssp.js +5431 -0
  55. data/lib/kalei/public/js/libs/marked/marked.js +793 -0
  56. data/lib/kalei/public/js/libs/pagedown/converter.js +1335 -0
  57. data/lib/kalei/public/js/libs/pagedown/pagedown +1332 -0
  58. data/lib/kalei/public/js/libs/pagedown/sanitizer.js +108 -0
  59. data/lib/kalei/public/js/libs/parseuri/parseuri.js +32 -0
  60. data/lib/kalei/public/js/libs/require/order.js +1 -0
  61. data/lib/kalei/public/js/libs/require/require.js +31 -0
  62. data/lib/kalei/public/js/libs/require/text.js +11 -0
  63. data/lib/kalei/public/js/libs/showdown/showdown.js +1344 -0
  64. data/lib/kalei/public/js/libs/underscore/underscore-min.js +31 -0
  65. data/lib/kalei/public/js/main.js +39 -0
  66. data/lib/kalei/public/js/router.js +39 -0
  67. data/lib/kalei/public/js/views/app.js +24 -0
  68. data/lib/kalei/public/js/views/style/menu.js +77 -0
  69. data/lib/kalei/public/js/views/style/page.js +100 -0
  70. data/lib/kalei/public/js/vm.js +33 -0
  71. data/lib/kalei/public/templates/layout.html +4 -0
  72. data/lib/kalei/public/templates/style/menu.html +22 -0
  73. data/lib/kalei/public/templates/style/page.html +15 -0
  74. data/lib/kalei/views/index.erb +18 -0
  75. data/test/dummy/README.rdoc +261 -0
  76. data/test/dummy/Rakefile +7 -0
  77. data/test/dummy/app/assets/javascripts/application.js +15 -0
  78. data/test/dummy/app/assets/stylesheets/application.css +13 -0
  79. data/test/dummy/app/assets/stylesheets/example.css +251 -0
  80. data/test/dummy/app/controllers/application_controller.rb +3 -0
  81. data/test/dummy/app/helpers/application_helper.rb +2 -0
  82. data/test/dummy/app/views/layouts/application.html.erb +14 -0
  83. data/test/dummy/config.ru +4 -0
  84. data/test/dummy/config/application.rb +65 -0
  85. data/test/dummy/config/boot.rb +10 -0
  86. data/test/dummy/config/environment.rb +5 -0
  87. data/test/dummy/config/environments/development.rb +31 -0
  88. data/test/dummy/config/environments/production.rb +64 -0
  89. data/test/dummy/config/environments/test.rb +35 -0
  90. data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
  91. data/test/dummy/config/initializers/inflections.rb +15 -0
  92. data/test/dummy/config/initializers/mime_types.rb +5 -0
  93. data/test/dummy/config/initializers/secret_token.rb +7 -0
  94. data/test/dummy/config/initializers/session_store.rb +8 -0
  95. data/test/dummy/config/initializers/wrap_parameters.rb +10 -0
  96. data/test/dummy/config/locales/en.yml +5 -0
  97. data/test/dummy/config/routes.rb +4 -0
  98. data/test/dummy/log/development (MacBook Air's conflicted copy 2012-11-07).log +12900 -0
  99. data/test/dummy/log/development (Work iMac's conflicted copy 2012-11-06).log +12539 -0
  100. data/test/dummy/log/development.log +16426 -0
  101. data/test/dummy/public/404.html +26 -0
  102. data/test/dummy/public/422.html +26 -0
  103. data/test/dummy/public/500.html +25 -0
  104. data/test/dummy/public/favicon.ico +0 -0
  105. data/test/dummy/script/rails +6 -0
  106. data/test/dummy/tmp/cache/assets/BBF/D60/sprockets%2Fc81500801e644b9c5335793957200428 +0 -0
  107. data/test/dummy/tmp/cache/assets/BE2/9B0/sprockets%2F4097e8869406a33602004190d03272ad +0 -0
  108. data/test/dummy/tmp/cache/assets/C59/B10/sprockets%2Fc6a54e0f5352e41a92c1451976584894 +0 -0
  109. data/test/dummy/tmp/cache/assets/C5F/F60/sprockets%2F661d2795e99d0034ce6873925e0256c4 +0 -0
  110. data/test/dummy/tmp/cache/assets/C64/8C0/sprockets%2F8996c378630075350fb258019546feef +0 -0
  111. data/test/dummy/tmp/cache/assets/C94/F80/sprockets%2F5169b582f529b8d582a59c77c247405f +0 -0
  112. data/test/dummy/tmp/cache/assets/CA2/420/sprockets%2Fd6a388375c983c17d367a676398f8c19 +0 -0
  113. data/test/dummy/tmp/cache/assets/CB0/0B0/sprockets%2F79332476368821ab45ad05e0ae798ad1 +0 -0
  114. data/test/dummy/tmp/cache/assets/CB1/C70/sprockets%2F7022bb23d88717cc1625b47988f0af61 +0 -0
  115. data/test/dummy/tmp/cache/assets/CB5/DB0/sprockets%2F3c20130f1945e66bbc9726cb8925f647 +0 -0
  116. data/test/dummy/tmp/cache/assets/CB6/DF0/sprockets%2F3d4ce8bf5883f171628c030851a5a669 +0 -0
  117. data/test/dummy/tmp/cache/assets/CC1/B70/sprockets%2F2451c355722fdc5979cd365f9f9705a3 +0 -0
  118. data/test/dummy/tmp/cache/assets/CC2/550/sprockets%2F07be9de6d83634f4e056ba2982578725 +0 -0
  119. data/test/dummy/tmp/cache/assets/CC5/8D0/sprockets%2F31f92d93c1650884a626e941c949bff8 +0 -0
  120. data/test/dummy/tmp/cache/assets/CC5/D90/sprockets%2F1b9f99d72878209259dce90e419a04d5 +0 -0
  121. data/test/dummy/tmp/cache/assets/CC8/780/sprockets%2F8578d679f76df60299b502a4c762a62f +0 -0
  122. data/test/dummy/tmp/cache/assets/CC8/C10/sprockets%2F69e29270f13a4c8cd925ac79608878d6 +0 -0
  123. data/test/dummy/tmp/cache/assets/CD1/700/sprockets%2F4a8e02ffcb8924669105305f0b107c1b +0 -0
  124. data/test/dummy/tmp/cache/assets/CD5/DC0/sprockets%2F92fa0519b445f0f1027d42bd9a4165e4 +0 -0
  125. data/test/dummy/tmp/cache/assets/CD8/370/sprockets%2F357970feca3ac29060c1e3861e2c0953 +0 -0
  126. data/test/dummy/tmp/cache/assets/CDB/DC0/sprockets%2F58518572a25128ada56ed9156aac53c4 +0 -0
  127. data/test/dummy/tmp/cache/assets/CDE/C90/sprockets%2F2b20d9775c811fdb6a466e86711d15c3 +0 -0
  128. data/test/dummy/tmp/cache/assets/CE3/2A0/sprockets%2F334b4fc16f7e765755c1be56c9010e28 +0 -0
  129. data/test/dummy/tmp/cache/assets/CE5/FF0/sprockets%2F6113d3e443309efb13b899b3a94b578e +0 -0
  130. data/test/dummy/tmp/cache/assets/CF2/7D0/sprockets%2F7c50d8877e9a4ee1553dc6626c373d38 +0 -0
  131. data/test/dummy/tmp/cache/assets/CF3/C60/sprockets%2Fdfc0395a5019a0a24b34c170a36424de +0 -0
  132. data/test/dummy/tmp/cache/assets/CFC/480/sprockets%2F9d5ab28532957b83f7f9fcbd78021699 +0 -0
  133. data/test/dummy/tmp/cache/assets/CFF/C60/sprockets%2F4ed7a36bde489e10f97698475493ae57 +0 -0
  134. data/test/dummy/tmp/cache/assets/D00/B00/sprockets%2Fd670c548ea2643bd95a65504c11cc13b +0 -0
  135. data/test/dummy/tmp/cache/assets/D0A/CB0/sprockets%2Fed8ba102e7d5015265f1e51a89b8d355 +0 -0
  136. data/test/dummy/tmp/cache/assets/D10/2B0/sprockets%2F1941a534f48d6fa7b22e23b4ca397b69 +0 -0
  137. data/test/dummy/tmp/cache/assets/D17/2A0/sprockets%2Fc094a0ad0b3abb1b92850a86f2000b61 +0 -0
  138. data/test/dummy/tmp/cache/assets/D17/920/sprockets%2Fa6ea2beb942f969acce6231944871652 +0 -0
  139. data/test/dummy/tmp/cache/assets/D19/7C0/sprockets%2F6bd121745f94b781ed36dd0ffa473856 +0 -0
  140. data/test/dummy/tmp/cache/assets/D1A/6F0/sprockets%2F41dd836dc3f691e237833bc1b6f76d93 +0 -0
  141. data/test/dummy/tmp/cache/assets/D1A/770/sprockets%2Fcfad959e3f5eb529a1310d85483b9419 +0 -0
  142. data/test/dummy/tmp/cache/assets/D1F/000/sprockets%2Fdecbf7d6343c0d9638d301c9982298c6 +0 -0
  143. data/test/dummy/tmp/cache/assets/D1F/4D0/sprockets%2F860075c377f26472f83ef56a7bb89aad +0 -0
  144. data/test/dummy/tmp/cache/assets/D20/7D0/sprockets%2F1f7e984b4c793c57d666af84ab414d53 +0 -0
  145. data/test/dummy/tmp/cache/assets/D23/D20/sprockets%2F746c5fb7c744dd87e61f34c8644183fb +0 -0
  146. data/test/dummy/tmp/cache/assets/D29/080/sprockets%2F6b81d746679c6151bc66da896aa97de9 +0 -0
  147. data/test/dummy/tmp/cache/assets/D29/890/sprockets%2Fb5d9c167884139e0f6b8d53816de6e9d +0 -0
  148. data/test/dummy/tmp/cache/assets/D2B/2D0/sprockets%2Fbaf7beb2c3603cfa100b276923a86543 +0 -0
  149. data/test/dummy/tmp/cache/assets/D2B/3F0/sprockets%2Fd6c1fabe78df17a601309081130ca90d +0 -0
  150. data/test/dummy/tmp/cache/assets/D2E/700/sprockets%2F9d6beb99735c03f375e19c5857ccf955 +0 -0
  151. data/test/dummy/tmp/cache/assets/D31/DF0/sprockets%2Fb9ca3ac15e18a4d032f61278565b7bd0 +0 -0
  152. data/test/dummy/tmp/cache/assets/D32/980/sprockets%2F65a361c15a5ff036ce119cb1d2296e4c +0 -0
  153. data/test/dummy/tmp/cache/assets/D32/A10/sprockets%2F13fe41fee1fe35b49d145bcc06610705 +0 -0
  154. data/test/dummy/tmp/cache/assets/D32/CA0/sprockets%2F05becf082d0b555622d944ac6e7202cf +0 -0
  155. data/test/dummy/tmp/cache/assets/D36/570/sprockets%2Fadfccb7c2436e006496eae16d6901523 +0 -0
  156. data/test/dummy/tmp/cache/assets/D3F/080/sprockets%2Fb5d1e36ac49d4c9e11728239ecf104e6 +0 -0
  157. data/test/dummy/tmp/cache/assets/D3F/630/sprockets%2F9093e471e526d13234feda4a9cc80fc5 +0 -0
  158. data/test/dummy/tmp/cache/assets/D41/3D0/sprockets%2Fd570b46455f776a30cbb729b442fbbf8 +0 -0
  159. data/test/dummy/tmp/cache/assets/D43/500/sprockets%2F91261e8d0df721df2c19e7c8cc6872b0 +0 -0
  160. data/test/dummy/tmp/cache/assets/D44/2F0/sprockets%2F8abebce08d92187dd84464b40264fc73 +0 -0
  161. data/test/dummy/tmp/cache/assets/D46/350/sprockets%2Fd8bcb0686002ee32c4bf49887f09be36 +0 -0
  162. data/test/dummy/tmp/cache/assets/D4A/F50/sprockets%2F99df6af7ff98150e1255d6d9110b80ea +0 -0
  163. data/test/dummy/tmp/cache/assets/D50/480/sprockets%2F6e151e3dec739c7a338a877ef65fc174 +0 -0
  164. data/test/dummy/tmp/cache/assets/D56/AE0/sprockets%2F68f98777bb22b8e8a78097ba0c86be0f +0 -0
  165. data/test/dummy/tmp/cache/assets/D5A/EA0/sprockets%2Fd771ace226fc8215a3572e0aa35bb0d6 +0 -0
  166. data/test/dummy/tmp/cache/assets/D5B/E00/sprockets%2Ffea8965ad9d35e43675fc5b948e0e934 +0 -0
  167. data/test/dummy/tmp/cache/assets/D68/860/sprockets%2Fafacb887390255dae680441eaf00ff52 +0 -0
  168. data/test/dummy/tmp/cache/assets/D6A/BD0/sprockets%2Fada1b7fa3ff025849aec28559a500c76 +0 -0
  169. data/test/dummy/tmp/cache/assets/D6D/F20/sprockets%2F3c1e635c4ba90a4512849be74fcfee07 +0 -0
  170. data/test/dummy/tmp/cache/assets/D6E/540/sprockets%2F4ea3314d23fc25fc9beec6262272f7f5 +0 -0
  171. data/test/dummy/tmp/cache/assets/D73/690/sprockets%2F356bd79cadb47fd8d6836c17d21318ab +0 -0
  172. data/test/dummy/tmp/cache/assets/D73/7D0/sprockets%2Ff89249a45e22e86c35f227bd340adedd +0 -0
  173. data/test/dummy/tmp/cache/assets/D75/000/sprockets%2Fdfae73207596c9fcc854a2aa1e4f7661 +0 -0
  174. data/test/dummy/tmp/cache/assets/D7A/340/sprockets%2Fc880ec2dd9f7c964cf13a12b9674c63d +0 -0
  175. data/test/dummy/tmp/cache/assets/D7B/6F0/sprockets%2Fc16bfd961e80bb761c67cd760179df8c +0 -0
  176. data/test/dummy/tmp/cache/assets/D7F/D20/sprockets%2Fe4293aa867945ef5c6eb5b26e69c6aa5 +0 -0
  177. data/test/dummy/tmp/cache/assets/D81/180/sprockets%2Fd666d9ef622f0e8cb708f5d8a6b2077f +0 -0
  178. data/test/dummy/tmp/cache/assets/D81/240/sprockets%2F1d0f3cd232c07902529b25abd0bd4ccd +0 -0
  179. data/test/dummy/tmp/cache/assets/D83/560/sprockets%2F9d807a49bc60df8ffb65e99292f3c0a6 +0 -0
  180. data/test/dummy/tmp/cache/assets/D85/D50/sprockets%2Feb82054976bcf4d46c573eafed819f58 +0 -0
  181. data/test/dummy/tmp/cache/assets/D8F/870/sprockets%2F696f6648b2fcbceb8e2686875e6cd6b6 +0 -0
  182. data/test/dummy/tmp/cache/assets/D94/9D0/sprockets%2Ff1c6747b2a961ab3ef92a5a1abe635c4 +0 -0
  183. data/test/dummy/tmp/cache/assets/D96/E00/sprockets%2F7f345bc6ada58cac0203458fc076f1ed +0 -0
  184. data/test/dummy/tmp/cache/assets/D98/DE0/sprockets%2Fbeac47000d16b66f5757aa626f5e8bda +0 -0
  185. data/test/dummy/tmp/cache/assets/D9D/BD0/sprockets%2F1f338b9df8d5a3ffe0b85591db253ab0 +0 -0
  186. data/test/dummy/tmp/cache/assets/DA0/0A0/sprockets%2F61e5c9d0b209a8ce5c8a9aa719ad564d +0 -0
  187. data/test/dummy/tmp/cache/assets/DB1/A10/sprockets%2Fde67190aff966baf9a57f6641fda292e +0 -0
  188. data/test/dummy/tmp/cache/assets/DBE/950/sprockets%2Fa3fbb592cacd368796899f89b95cde1d +0 -0
  189. data/test/dummy/tmp/cache/assets/DC3/950/sprockets%2F12be1e5b8e749be4b42e4ccbb24e1a84 +0 -0
  190. data/test/dummy/tmp/cache/assets/DC5/E10/sprockets%2Fd10332dee1b2ee73913f7f01e6bffc2f +0 -0
  191. data/test/dummy/tmp/cache/assets/DC7/FF0/sprockets%2F4d3d0db28baaafb745e1b4c5f564d891 +0 -0
  192. data/test/dummy/tmp/cache/assets/DCC/810/sprockets%2F8d18398a60db7e9e61ae42bea18b2aeb +0 -0
  193. data/test/dummy/tmp/cache/assets/DE5/A10/sprockets%2F1aa8db45a4cf7ab09d460c22ed063adb +0 -0
  194. data/test/dummy/tmp/cache/assets/DEB/9E0/sprockets%2F1afb4b1d001bc3c1b7cf8cc548bd73e7 +0 -0
  195. data/test/dummy/tmp/cache/assets/DF3/AB0/sprockets%2Fa2fbea7b8e275e2e4b610cd1d8fed006 +0 -0
  196. data/test/dummy/tmp/cache/assets/DF4/A90/sprockets%2Fc6d9482adadab4569aacdf12a224af49 +0 -0
  197. data/test/dummy/tmp/cache/assets/DF5/520/sprockets%2F0cb7052285cefb59b10efc3ed1c6f5cd +0 -0
  198. data/test/dummy/tmp/cache/assets/DF8/000/sprockets%2Fb2bc6fbabfb2c270896a8a44da66fa47 +0 -0
  199. data/test/dummy/tmp/cache/assets/DFB/2D0/sprockets%2F0e88b08c47faeae40d7682dc28b1fbad +0 -0
  200. data/test/dummy/tmp/cache/assets/DFB/9A0/sprockets%2Fb9a29f57d1ebf045452ed6cbd62eae1d +0 -0
  201. data/test/dummy/tmp/cache/assets/E02/D20/sprockets%2Fbd7f5fd245b9c9fc534cad60ef038d4a +0 -0
  202. data/test/dummy/tmp/cache/assets/E35/0A0/sprockets%2F9e0f5c61a97a72fc952a7dbbcefb7cb6 +0 -0
  203. data/test/dummy/tmp/cache/assets/E38/BA0/sprockets%2Fbee7ee5afe77332bcc53bc4e29c77a7f +0 -0
  204. data/test/dummy/tmp/cache/assets/E55/740/sprockets%2Fd51ee7ad0adc4b323ce1a9b88ed4a9af +0 -0
  205. data/test/dummy/tmp/cache/assets/E5C/410/sprockets%2F1bec976eb7fc54612519dcaccae6ccbe +0 -0
  206. data/test/dummy/tmp/cache/assets/EC5/D20/sprockets%2Fc1cf4676f1d3ab9dc9fcbaae59fbe9da +0 -0
  207. data/test/functional/kalei/index_controller_test.rb +11 -0
  208. data/test/integration/navigation_test.rb +9 -0
  209. data/test/kalei_test.rb +7 -0
  210. data/test/test_helper.rb +15 -0
  211. metadata +414 -0
@@ -0,0 +1,39 @@
1
+ /*
2
+ # Fixie Example Usage
3
+
4
+ [fixie.js](http://fixiejs.com/) is bundled with Kalei.
5
+
6
+ "Just set class to fixie wherever you need dummy content. It works for headers, paragraphs, lists, images, and just about anything else."
7
+
8
+ ## Example Heading and Paragraph
9
+
10
+ ```
11
+ <h3 class="fixie fixie-demo"></h3>
12
+ <p class="fixie fixie-demo"></p>
13
+ ```
14
+ */
15
+ h3.fixie-demo {
16
+ color: #994444;
17
+ }
18
+ p.fixie-demo {
19
+ color: #444499;
20
+ }
21
+
22
+ /*
23
+ ## Example Fixie Images
24
+
25
+ ```
26
+ <div class="fixie-demo">
27
+ <img class="fixie" />
28
+ <img class="fixie" />
29
+ <img class="fixie" />
30
+ <img class="fixie" />
31
+ </div>
32
+ ```
33
+ */
34
+ .fixie-demo img {
35
+ float: left;
36
+ margin-left: 10px;
37
+ width:60px;
38
+ height:60px;
39
+ }
@@ -0,0 +1,24 @@
1
+ Copyright (c) 2006, Ivan Sagalaev
2
+ All rights reserved.
3
+ Redistribution and use in source and binary forms, with or without
4
+ modification, are permitted provided that the following conditions are met:
5
+
6
+ * Redistributions of source code must retain the above copyright
7
+ notice, this list of conditions and the following disclaimer.
8
+ * Redistributions in binary form must reproduce the above copyright
9
+ notice, this list of conditions and the following disclaimer in the
10
+ documentation and/or other materials provided with the distribution.
11
+ * Neither the name of highlight.js nor the names of its contributors
12
+ may be used to endorse or promote products derived from this software
13
+ without specific prior written permission.
14
+
15
+ THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ANY
16
+ EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
17
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
18
+ DISCLAIMED. IN NO EVENT SHALL THE REGENTS AND CONTRIBUTORS BE LIABLE FOR ANY
19
+ DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
20
+ (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
21
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
22
+ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
24
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@@ -0,0 +1,120 @@
1
+ # Highlight.js
2
+
3
+ Highlight.js highlights syntax in code examples on blogs, forums and,
4
+ in fact, on any web page. It's very easy to use because it works
5
+ automatically: finds blocks of code, detects a language, highlights it.
6
+
7
+ Autodetection can be fine tuned when it fails by itself (see "Heuristics").
8
+
9
+
10
+ ## Basic usage
11
+
12
+ Link the library and a stylesheet from your page and hook highlighting to
13
+ the page load event:
14
+
15
+ ```html
16
+ <link rel="stylesheet" href="styles/default.css">
17
+ <script src="highlight.pack.js"></script>
18
+ <script>hljs.initHighlightingOnLoad();</script>
19
+ ```
20
+
21
+ This will highlight all code on the page marked up as `<pre><code> .. </code></pre>`.
22
+ If you use different markup or need to apply highlighting dynamically, read
23
+ "Custom initialization" below.
24
+
25
+ - You can download your own customized version of "highlight.pack.js" or
26
+ use the hosted one as described on the download page:
27
+ <http://softwaremaniacs.org/soft/highlight/en/download/>
28
+
29
+ - Style themes are available in the download package or as hosted files.
30
+ To create a custom style for your site see the class reference in the file
31
+ [classref.txt][cr] from the downloaded package.
32
+
33
+ [cr]: http://github.com/isagalaev/highlight.js/blob/master/classref.txt
34
+
35
+
36
+ ## Tab replacement
37
+
38
+ You can replace TAB ('\x09') characters used for indentation in your code
39
+ with some fixed number of spaces or with a `<span>` to give them special
40
+ styling:
41
+
42
+ ```html
43
+ <script type="text/javascript">
44
+ hljs.tabReplace = ' '; // 4 spaces
45
+ // ... or
46
+ hljs.tabReplace = '<span class="indent">\t</span>';
47
+
48
+ hljs.initHighlightingOnLoad();
49
+ </script>
50
+ ```
51
+
52
+ ## Custom initialization
53
+
54
+ If you use different markup for code blocks you can initialize them manually
55
+ with `highlightBlock(code, tabReplace, useBR)` function. It takes a DOM element
56
+ containing the code to highlight and optionally a string with which to replace
57
+ TAB characters.
58
+
59
+ Initialization using, for example, jQuery might look like this:
60
+
61
+ ```javascript
62
+ $(document).ready(function() {
63
+ $('pre code').each(function(i, e) {hljs.highlightBlock(e)});
64
+ });
65
+ ```
66
+
67
+ You can use `highlightBlock` to highlight blocks dynamically inserted into
68
+ the page. Just make sure you don't do it twice for already highlighted
69
+ blocks.
70
+
71
+ If your code container relies on `<br>` tags instead of line breaks (i.e. if
72
+ it's not `<pre>`) pass `true` into the third parameter of `highlightBlock`
73
+ to make highlight.js use `<br>` in the output:
74
+
75
+ ```javascript
76
+ $('div.code').each(function(i, e) {hljs.highlightBlock(e, null, true)});
77
+ ```
78
+
79
+
80
+ ## Heuristics
81
+
82
+ Autodetection of a code's language is done using a simple heuristic:
83
+ the program tries to highlight a fragment with all available languages and
84
+ counts all syntactic structures that it finds along the way. The language
85
+ with greatest count wins.
86
+
87
+ This means that in short fragments the probability of an error is high
88
+ (and it really happens sometimes). In this cases you can set the fragment's
89
+ language explicitly by assigning a class to the `<code>` element:
90
+
91
+ ```html
92
+ <pre><code class="html">...</code></pre>
93
+ ```
94
+
95
+ You can use class names recommended in HTML5: "language-html",
96
+ "language-php". Classes also can be assigned to the `<pre>` element.
97
+
98
+ To disable highlighting of a fragment altogether use "no-highlight" class:
99
+
100
+ ```html
101
+ <pre><code class="no-highlight">...</code></pre>
102
+ ```
103
+
104
+
105
+ ## Export
106
+
107
+ File export.html contains a little program that allows you to paste in a code
108
+ snippet and then copy and paste the resulting HTML code generated by the
109
+ highlighter. This is useful in situations when you can't use the script itself
110
+ on a site.
111
+
112
+
113
+ ## Meta
114
+
115
+ - Version: 7.0
116
+ - URL: http://softwaremaniacs.org/soft/highlight/en/
117
+ - Author: Ivan Sagalaev (<maniac@softwaremaniacs.org>)
118
+
119
+ For the license terms see LICENSE files.
120
+ For the list of contributors see AUTHORS.en.txt file.
@@ -0,0 +1,125 @@
1
+ # Highlight.js
2
+
3
+ Highlight.js нужен для подсветки синтаксиса в примерах кода в блогах,
4
+ форумах и вообще на любых веб-страницах. Пользоваться им очень просто,
5
+ потому что работает он автоматически: сам находит блоки кода, сам
6
+ определяет язык, сам подсвечивает.
7
+
8
+ Автоопределением языка можно управлять, когда оно не справляется само (см.
9
+ дальше "Эвристика").
10
+
11
+
12
+ ## Простое использование
13
+
14
+ Подключите библиотеку и стиль на страницу и повесть вызов подсветки на
15
+ загрузку страницы:
16
+
17
+ ```html
18
+ <link rel="stylesheet" href="styles/default.css">
19
+ <script src="highlight.pack.js"></script>
20
+ <script>hljs.initHighlightingOnLoad();</script>
21
+ ```
22
+
23
+ Весь код на странице, обрамлённый в теги `<pre><code> .. </code></pre>`
24
+ будет автоматически подсвечен. Если вы используете другие теги или хотите
25
+ подсвечивать блоки кода динамически, читайте "Инициализацию вручную" ниже.
26
+
27
+ - Вы можете скачать собственную версию "highlight.pack.js" или сослаться
28
+ на захостенный файл, как описано на странице загрузки:
29
+ <http://softwaremaniacs.org/soft/highlight/download/>
30
+
31
+ - Стилевые темы можно найти в загруженном архиве или также использовать
32
+ захостенные. Чтобы сделать собственный стиль для своего сайта, вам
33
+ будет полезен справочник классов в файле [classref.txt][cr], который тоже
34
+ есть в архиве.
35
+
36
+ [cr]: http://github.com/isagalaev/highlight.js/blob/master/classref.txt
37
+
38
+
39
+ ## Замена TABов
40
+
41
+ Также вы можете заменить символы TAB ('\x09'), используемые для отступов, на
42
+ фиксированное количество пробелов или на отдельный `<span>`, чтобы задать ему
43
+ какой-нибудь специальный стиль:
44
+
45
+ ```html
46
+ <script type="text/javascript">
47
+ hljs.tabReplace = ' '; // 4 spaces
48
+ // ... or
49
+ hljs.tabReplace = '<span class="indent">\t</span>';
50
+
51
+ hljs.initHighlightingOnLoad();
52
+ </script>
53
+ ```
54
+
55
+
56
+ ## Инициализация вручную
57
+
58
+ Если вы используете другие теги для блоков кода, вы можете инициализировать их
59
+ явно с помощью функции `highlightBlock(code, tabReplace, useBR)`. Она принимает
60
+ DOM-элемент с текстом расцвечиваемого кода и опционально - строчку для замены
61
+ символов TAB.
62
+
63
+ Например с использованием jQuery код инициализации может выглядеть так:
64
+
65
+ ```javascript
66
+ $(document).ready(function() {
67
+ $('pre code').each(function(i, e) {hljs.highlightBlock(e)});
68
+ });
69
+ ```
70
+
71
+ `highlightBlock` можно также использовать, чтобы подсветить блоки кода,
72
+ добавленные на страницу динамически. Только убедитесь, что вы не делаете этого
73
+ повторно для уже раскрашенных блоков.
74
+
75
+ Если ваш блок кода использует `<br>` вместо переводов строки (т.е. если это не
76
+ `<pre>`), передайте `true` третьим параметром в `highlightBlock`:
77
+
78
+ ```javascript
79
+ $('div.code').each(function(i, e) {hljs.highlightBlock(e, null, true)});
80
+ ```
81
+
82
+
83
+ ## Эвристика
84
+
85
+ Определение языка, на котором написан фрагмент, делается с помощью
86
+ довольно простой эвристики: программа пытается расцветить фрагмент всеми
87
+ языками подряд, и для каждого языка считает количество подошедших
88
+ синтаксически конструкций и ключевых слов. Для какого языка нашлось больше,
89
+ тот и выбирается.
90
+
91
+ Это означает, что в коротких фрагментах высока вероятность ошибки, что
92
+ периодически и случается. Чтобы указать язык фрагмента явно, надо написать
93
+ его название в виде класса к элементу `<code>`:
94
+
95
+ ```html
96
+ <pre><code class="html">...</code></pre>
97
+ ```
98
+
99
+ Можно использовать рекомендованные в HTML5 названия классов:
100
+ "language-html", "language-php". Также можно назначать классы на элемент
101
+ `<pre>`.
102
+
103
+ Чтобы запретить расцветку фрагмента вообще, используется класс "no-highlight":
104
+
105
+ ```html
106
+ <pre><code class="no-highlight">...</code></pre>
107
+ ```
108
+
109
+
110
+ ## Экспорт
111
+
112
+ В файле export.html находится небольшая программка, которая показывает и дает
113
+ скопировать непосредственно HTML-код подсветки для любого заданного фрагмента кода.
114
+ Это может понадобится например на сайте, на котором нельзя подключить сам скрипт
115
+ highlight.js.
116
+
117
+
118
+ ## Координаты
119
+
120
+ - Версия: 7.0
121
+ - URL: http://softwaremaniacs.org/soft/highlight/
122
+ - Автор: Иван Сагалаев (<maniac@softwaremaniacs.org>)
123
+
124
+ Лицензионное соглашение читайте в файле LICENSE.
125
+ Список соавторов читайте в файле AUTHORS.ru.txt
@@ -0,0 +1,544 @@
1
+ This is a full list of available classes corresponding to languages'
2
+ syntactic structures. The parentheses after language name contain identifiers
3
+ used as class names in `<code>` element.
4
+
5
+ Python ("python"):
6
+
7
+ keyword keyword
8
+ built_in built-in objects (None, False, True and Ellipsis)
9
+ number number
10
+ string string (of any type)
11
+ comment comment
12
+ decorator @-decorator for functions
13
+ function function header "def some_name(...):"
14
+ class class header "class SomeName(...):"
15
+ title name of a function or a class inside a header
16
+ params everything inside parentheses in a function's or class' header
17
+
18
+ Python profiler results ("profile"):
19
+
20
+ number number
21
+ string string
22
+ builtin builtin function entry
23
+ filename filename in an entry
24
+ summary profiling summary
25
+ header header of table of results
26
+ keyword column header
27
+ function function name in an entry (including parentheses)
28
+ title actual name of a function in an entry (excluding parentheses)
29
+
30
+ Ruby ("ruby"):
31
+
32
+ keyword keyword
33
+ string string
34
+ subst in-string substitution (#{...})
35
+ comment comment
36
+ yardoctag YARD tag
37
+ function function header "def some_name(...):"
38
+ class class header "class SomeName(...):"
39
+ title name of a function or a class inside a header
40
+ parent name of a parent class
41
+ symbol symbol
42
+ instancevar instance variable
43
+
44
+ Perl ("perl"):
45
+
46
+ keyword keyword
47
+ comment comment
48
+ number number
49
+ string string
50
+ regexp regular expression
51
+ sub subroutine header (from "sub" till "{")
52
+ variable variable starting with "$", "%", "@"
53
+ operator operator
54
+ pod plain old doc
55
+
56
+ PHP ("php"):
57
+
58
+ keyword keyword
59
+ number number
60
+ string string (of any type)
61
+ comment comment
62
+ phpdoc phpdoc params in comments
63
+ variable variable starting with "$"
64
+ preprocessor preprocessor marks: "<?php" and "?>"
65
+
66
+ Scala ("scala"):
67
+
68
+ keyword keyword
69
+ number number
70
+ string string
71
+ comment comment
72
+ annotaion annotation
73
+ javadoc javadoc comment
74
+ javadoctag @-tag in javadoc
75
+ class class header
76
+ title class name inside a header
77
+ params everything in parentheses inside a class header
78
+ inheritance keywords "extends" and "with" inside class header
79
+
80
+ Go language ("go"):
81
+ comment comment
82
+ string string constant
83
+ number number
84
+ keyword language keywords
85
+ constant true false nil iota
86
+ typename built-in plain types (int, string etc.)
87
+ built_in built-in functions
88
+
89
+ XML ("xml"):
90
+
91
+ tag any tag from "<" till ">"
92
+ comment comment
93
+ pi processing instruction (<? ... ?>)
94
+ cdata CDATA section
95
+ attribute attribute
96
+ value attribute's value
97
+
98
+ HTML ("html"):
99
+
100
+ keyword HTML tag
101
+ tag any tag from "<" till ">"
102
+ comment comment
103
+ doctype <!DOCTYPE ... > declaration
104
+ attribute tag's attribute with or without value
105
+ value attribute's value
106
+
107
+ CSS ("css"):
108
+
109
+ tag HTML tag in selectors
110
+ id #some_name in selectors
111
+ class .some_name in selectors
112
+ at_rule @-rule till first "{" or ";"
113
+ attr_selector attribute selector (square brackets in a[href^=http://])
114
+ pseudo pseudo classes and elemens (:after, ::after etc.)
115
+ comment comment
116
+ rules everything from "{" till "}"
117
+ property property name inside a rule
118
+ value property value inside a rule, from ":" till ";" or
119
+ till the end of rule block
120
+ number number within a value
121
+ string string within a value
122
+ hexcolor hex color (#FFFFFF) within a value
123
+ function CSS function within a value
124
+ params everything between "(" and ")" within a function
125
+ important "!important" symbol
126
+
127
+ Markdown ("markdown"):
128
+
129
+ header header
130
+ bullet list bullet
131
+ emphasis emphasis
132
+ strong strong emphasis
133
+ blockquote blockquote
134
+ code code
135
+ horizontal_rule horizontal rule
136
+ link_label link label
137
+ link_url link url
138
+
139
+ Django ("django"):
140
+
141
+ keyword HTML tag in HTML, default tags and default filters in templates
142
+ tag any tag from "<" till ">"
143
+ comment comment
144
+ doctype <!DOCTYPE ... > declaration
145
+ attribute tag's attribute with or withou value
146
+ value attribute's value
147
+ template_tag template tag {% .. %}
148
+ variable template variable {{ .. }}
149
+ template_comment template comment, both {# .. #} and {% comment %}
150
+ filter filter from "|" till the next filter or the end of tag
151
+ argument filter argument
152
+
153
+ JSON ("json"):
154
+
155
+ number number
156
+ literal "true", "false" and "null"
157
+ string string value
158
+ attribute name of an object property
159
+ value value of an object property
160
+
161
+ JavaScript ("javascript"):
162
+
163
+ keyword keyword
164
+ comment comment
165
+ number number
166
+ literal special literal: "true", "false" and "null"
167
+ string string
168
+ regexp regular expression
169
+ function header of a function
170
+ title name of a function inside a header
171
+ params parentheses and everything inside them in a function's header
172
+
173
+ CoffeeScript ("coffeescript"):
174
+
175
+ keyword keyword
176
+ comment comment
177
+ number number
178
+ literal special literal: "true", "false" and "null"
179
+ string string
180
+ regexp regular expression
181
+ function header of a function
182
+ title name of a function variable inside a header
183
+ params parentheses and everything inside them in a function's header
184
+
185
+ ActionScript ("actionscript"):
186
+
187
+ comment comment
188
+ string string
189
+ number number
190
+ keyword keywords
191
+ literal literal
192
+ reserved reserved keyword
193
+ title name of declaration (package, class or function)
194
+ preprocessor preprocessor directive (import, include)
195
+ type type of returned value (for functions)
196
+ package package (named or not)
197
+ class class/interface
198
+ function function
199
+ param params of function
200
+ rest_arg rest argument of function
201
+
202
+ VBScript ("vbscript"):
203
+
204
+ keyword keyword
205
+ number number
206
+ string string
207
+ comment comment
208
+ built_in built-in function
209
+
210
+ HTTP ("http"):
211
+
212
+ request first line of a request
213
+ status first line of a response
214
+ attribute header name
215
+ string header value or query string in a request line
216
+ number status code
217
+
218
+ Lua ("lua"):
219
+
220
+ keyword keyword
221
+ number number
222
+ string string
223
+ comment comment
224
+ built_in built-in operator
225
+ function header of a function
226
+ title name of a function inside a header
227
+ params everything inside parentheses in a function's header
228
+ long_brackets multiline string in [=[ .. ]=]
229
+
230
+ Delphi ("delphi"):
231
+
232
+ keyword keyword
233
+ comment comment (of any type)
234
+ number number
235
+ string string
236
+ function header of a function, procedure, constructor and destructor
237
+ title name of a function, procedure, constructor or destructor
238
+ inside a header
239
+ params everything inside parentheses in a function's header
240
+ class class' body from "= class" till "end;"
241
+
242
+ Java ("java"):
243
+
244
+ keyword keyword
245
+ number number
246
+ string string
247
+ comment commment
248
+ annotaion annotation
249
+ javadoc javadoc comment
250
+ class class header from "class" till "{"
251
+ title class name inside a header
252
+ params everything in parentheses inside a class header
253
+ inheritance keywords "extends" and "implements" inside class header
254
+
255
+ C++ ("cpp"):
256
+
257
+ keyword keyword
258
+ number number
259
+ string string and character
260
+ comment comment
261
+ preprocessor preprocessor directive
262
+ stl_container instantiation of STL containers ("vector<...>")
263
+
264
+ Objective C ("objectivec"):
265
+ keyword keyword
266
+ built_in Cocoa/Cocoa Touch constants and classes
267
+ number number
268
+ string string
269
+ comment comment
270
+ preprocessor preprocessor directive
271
+ class interface/implementation, protocol and forward class declaration
272
+ variable properties and struct accesors
273
+
274
+ Vala ("vala"):
275
+
276
+ keyword keyword
277
+ number number
278
+ string string
279
+ comment comment
280
+ class class definitions
281
+ title in class definition
282
+ constant ALL_UPPER_CASE
283
+
284
+ C# ("cs"):
285
+
286
+ keyword keyword
287
+ number number
288
+ string string
289
+ comment commment
290
+ xmlDocTag xmldoc tag ("///", "<!--", "-->", "<..>")
291
+
292
+ D language ("d"):
293
+
294
+ comment comment
295
+ string string constant
296
+ number number
297
+ keyword language keywords (including @attributes)
298
+ constant true false null
299
+ built_in built-in plain types (int, string etc.)
300
+
301
+ RenderMan RSL ("rsl"):
302
+
303
+ keyword keyword
304
+ number number
305
+ string string (including @"..")
306
+ comment comment
307
+ preprocessor preprocessor directive
308
+ shader sahder keywords
309
+ shading shading keywords
310
+ built_in built-in function
311
+
312
+ RenderMan RIB ("rib"):
313
+
314
+ keyword keyword
315
+ number number
316
+ string string
317
+ comment comment
318
+ commands command
319
+
320
+ Maya Embedded Language ("mel"):
321
+
322
+ keyword keyword
323
+ number number
324
+ string string
325
+ comment comment
326
+ variable variable
327
+
328
+ SQL ("sql"):
329
+
330
+ keyword keyword (mostly SQL'92 and SQL'99)
331
+ number number
332
+ string string (of any type: "..", '..', `..`)
333
+ comment comment
334
+ aggregate aggregate function
335
+
336
+ Smalltalk ("smalltalk"):
337
+
338
+ keyword keyword
339
+ number number
340
+ string string
341
+ comment commment
342
+ symbol symbol
343
+ array array
344
+ class name of a class
345
+ char char
346
+ localvars block of local variables
347
+
348
+ Lisp ("lisp"):
349
+
350
+ keyword keyword
351
+ number number
352
+ string string
353
+ comment commment
354
+ variable variable
355
+ literal b, t and nil
356
+ list non-quoted list
357
+ title first symbol in a non-quoted list
358
+ body remainder of the non-quoted list
359
+ quoted quoted list, both "(quote .. )" and "'(..)"
360
+
361
+ Ini ("ini"):
362
+
363
+ title title of a section
364
+ value value of a setting of any type
365
+ string string
366
+ number number
367
+ keyword boolean value keyword
368
+
369
+ Apache ("apache"):
370
+
371
+ keyword keyword
372
+ number number
373
+ comment commment
374
+ literal On and Off
375
+ sqbracket variables in rewrites "%{..}"
376
+ cbracket options in rewrites "[..]"
377
+ tag begin and end of a configuration section
378
+
379
+ Nginx ("nginx"):
380
+
381
+ title directive title
382
+ string string
383
+ number number
384
+ comment comment
385
+ built_in built-in constant
386
+ variable $-variable
387
+ regexp regexp
388
+
389
+ Diff ("diff"):
390
+
391
+ header file header
392
+ chunk chunk header within a file
393
+ addition added lines
394
+ deletion deleted lines
395
+ change changed lines
396
+
397
+ DOS ("dos"):
398
+
399
+ keyword keyword
400
+ flow batch control keyword
401
+ stream DOS special files ("con", "prn", ...)
402
+ winutils some commands (see dos.js specifically)
403
+ envvar environment variables
404
+
405
+ Bash ("bash"):
406
+
407
+ keyword keyword
408
+ string string
409
+ number number
410
+ comment comment
411
+ literal special literal: "true" и "false"
412
+ variable variable
413
+ shebang script interpreter header
414
+
415
+ CMake ("cmake")
416
+
417
+ keyword keyword
418
+ number number
419
+ string string
420
+ comment commment
421
+ envvar $-variable
422
+
423
+ Axapta ("axapta"):
424
+
425
+ keyword keyword
426
+ number number
427
+ string string
428
+ comment commment
429
+ class class header from "class" till "{"
430
+ title class name inside a header
431
+ params everything in parentheses inside a class header
432
+ inheritance keywords "extends" and "implements" inside class header
433
+ preprocessor preprocessor directive
434
+
435
+ 1C ("1c"):
436
+
437
+ keyword keyword
438
+ number number
439
+ date date
440
+ string string
441
+ comment commment
442
+ function header of function or procudure
443
+ title function name inside a header
444
+ params everything in parentheses inside a function header
445
+ preprocessor preprocessor directive
446
+
447
+ AVR assembler ("avrasm"):
448
+
449
+ keyword keyword
450
+ built_in pre-defined register
451
+ number number
452
+ string string
453
+ comment commment
454
+ label label
455
+ preprocessor preprocessor directive
456
+ localvars substitution in .macro
457
+
458
+ VHDL ("vhdl")
459
+
460
+ keyword keyword
461
+ number number
462
+ string string
463
+ comment commment
464
+ literal signal logical value
465
+ typename typename
466
+ attribute signal attribute
467
+
468
+ Parser3 ("parser3"):
469
+
470
+ keyword keyword
471
+ number number
472
+ comment commment
473
+ variable variable starting with "$"
474
+ preprocessor preprocessor directive
475
+ title user-defined name starting with "@"
476
+
477
+ TeX ("tex"):
478
+
479
+ comment comment
480
+ number number
481
+ command command
482
+ parameter parameter
483
+ formula formula
484
+ special special symbol
485
+
486
+ Haskell ("haskell"):
487
+
488
+ keyword keyword
489
+ number number
490
+ string string
491
+ comment comment
492
+ class type classes and other data types
493
+ title function name
494
+ type type class name
495
+ typedef definition of types (type, newtype, data)
496
+
497
+ Erlang ("erlang"):
498
+
499
+ comment comment
500
+ string string
501
+ number number
502
+ keyword keyword
503
+ record_name record access (#record_name)
504
+ title name of declaration function
505
+ variable variable (starts with capital letter or with _)
506
+ pp.keywords module's attribute (-attribute)
507
+ function_name atom or atom:atom in case of function call
508
+
509
+ Rust ("rust"):
510
+
511
+ comment comment
512
+ string string
513
+ number number
514
+ keyword keyword
515
+ title name of declaration
516
+ preprocessor preprocessor directive
517
+
518
+ Matlab ("matlab"):
519
+
520
+ comment comment
521
+ string string
522
+ number number
523
+ keyword keyword
524
+ title function name
525
+ function function
526
+ param params of function
527
+
528
+ R ("r"):
529
+
530
+ comment comment
531
+ string string constant
532
+ number number
533
+ keyword language keywords (function, if) plus "structural"
534
+ functions (attach, require, setClass)
535
+ literal special literal: TRUE, FALSE, NULL, NA, etc.
536
+
537
+ OpenGL Shading Language ("glsl"):
538
+
539
+ comment comment
540
+ number number
541
+ preprocessor preprocessor directive
542
+ keyword keyword
543
+ built_in GLSL built-in functions and variables
544
+ literal true false