radiant 1.0.0.rc1 → 1.0.0.rc2

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of radiant might be problematic. Click here for more details.

Files changed (623) hide show
  1. data/app/controllers/admin/resource_controller.rb +1 -0
  2. data/app/controllers/application_controller.rb +1 -1
  3. data/app/models/deprecated_tags.rb +5 -48
  4. data/app/models/user_action_observer.rb +8 -2
  5. data/app/views/layouts/application.html.haml +1 -1
  6. data/config/boot.rb +2 -2
  7. data/config/environment.rb +5 -3
  8. data/config/initializers/compass.rb +5 -0
  9. data/config/locales/en.yml +2 -2
  10. data/features/step_definitions/admin/pages_management_steps.rb +6 -1
  11. data/features/support/paths.rb +13 -0
  12. data/lib/generators/extension/templates/cucumber_env.rb +5 -1
  13. data/lib/generators/extension/templates/cucumber_paths.rb +20 -12
  14. data/lib/generators/extension/templates/gemspec.rb +10 -5
  15. data/lib/generators/instance/templates/instance_environment.rb +4 -2
  16. data/lib/radiant.rb +1 -1
  17. data/lib/radiant/gem_dependency_fix.rb +1 -1
  18. data/lib/radiant/taggable.rb +42 -3
  19. data/lib/tasks/framework.rake +6 -6
  20. data/{vendor/plugins/haml/test/sass/results/warn.css → log/.keep} +0 -0
  21. data/radiant.gemspec +3 -2
  22. data/script/console +2 -2
  23. data/spec/controllers/admin/pages_controller_spec.rb +1 -1
  24. data/spec/lib/radiant/taggable_spec.rb +53 -0
  25. data/vendor/extensions/archive/Rakefile +3 -3
  26. data/vendor/extensions/archive/features/support/env.rb +5 -1
  27. data/vendor/extensions/archive/features/support/paths.rb +20 -12
  28. data/vendor/extensions/archive/radiant-archive-extension.gemspec +10 -5
  29. data/vendor/extensions/archive/tmp/cache/meta/0e/da69d02186242cdfda62e46044566f2bc50f3a +0 -0
  30. data/vendor/extensions/{assets → clipped}/LICENSE +0 -0
  31. data/vendor/extensions/{assets → clipped}/README.md +21 -21
  32. data/vendor/extensions/{assets → clipped}/Rakefile +29 -31
  33. data/vendor/extensions/{assets → clipped}/app/controllers/admin/assets_controller.rb +16 -11
  34. data/vendor/extensions/clipped/app/controllers/admin/page_attachments_controller.rb +18 -0
  35. data/vendor/extensions/clipped/app/helpers/admin/assets_helper.rb +16 -0
  36. data/vendor/extensions/{assets → clipped}/app/models/asset.rb +12 -9
  37. data/vendor/extensions/{assets → clipped}/app/models/asset_tags.rb +36 -53
  38. data/vendor/extensions/{assets → clipped}/app/models/asset_type.rb +1 -7
  39. data/vendor/extensions/{assets → clipped}/app/models/old_page_attachment.rb +0 -0
  40. data/vendor/extensions/clipped/app/models/page_attachment.rb +21 -0
  41. data/vendor/extensions/{assets → clipped}/app/views/admin/assets/_asset.html.haml +2 -2
  42. data/vendor/extensions/{assets → clipped}/app/views/admin/assets/_asset_table.html.haml +4 -4
  43. data/vendor/extensions/clipped/app/views/admin/assets/_errors.html.haml +3 -0
  44. data/vendor/extensions/{assets → clipped}/app/views/admin/assets/_form.html.haml +2 -2
  45. data/vendor/extensions/{assets → clipped}/app/views/admin/assets/_page_assets.html.haml +1 -1
  46. data/vendor/extensions/{assets → clipped}/app/views/admin/assets/_search.html.haml +0 -0
  47. data/vendor/extensions/{assets → clipped}/app/views/admin/assets/_search_results.html.haml +1 -1
  48. data/vendor/extensions/{assets → clipped}/app/views/admin/assets/edit.html.haml +7 -8
  49. data/vendor/extensions/{assets → clipped}/app/views/admin/assets/index.html.haml +3 -2
  50. data/vendor/extensions/{assets → clipped}/app/views/admin/assets/new.html.haml +2 -2
  51. data/vendor/extensions/clipped/app/views/admin/assets/refresh.html.haml +14 -0
  52. data/vendor/extensions/{assets → clipped}/app/views/admin/assets/remove.html.haml +3 -3
  53. data/vendor/extensions/{assets → clipped}/app/views/admin/configuration/_edit.html.haml +1 -1
  54. data/vendor/extensions/{assets → clipped}/app/views/admin/configuration/_show.html.haml +1 -1
  55. data/vendor/extensions/clipped/app/views/admin/page_attachments/_attachment.html.haml +25 -0
  56. data/vendor/extensions/{assets → clipped}/app/views/admin/page_parts/_page_part.html.haml +3 -2
  57. data/vendor/extensions/{assets → clipped}/app/views/admin/pages/_asset_popups.html.haml +7 -7
  58. data/vendor/extensions/clipped/app/views/admin/pages/_assets.html.haml +11 -0
  59. data/vendor/extensions/{assets → clipped}/app/views/admin/removed/_assets_bucket.html.haml +1 -1
  60. data/vendor/extensions/{assets → clipped}/app/views/admin/removed/_assets_container.html.haml +9 -9
  61. data/vendor/extensions/{assets → clipped}/app/views/admin/removed/_bucket.html.haml +1 -1
  62. data/vendor/extensions/{assets → clipped}/app/views/admin/removed/_bucket_asset.html.haml +2 -2
  63. data/vendor/extensions/clipped/app/views/admin/removed/_show_bucket_link.html.haml +4 -0
  64. data/vendor/extensions/{assets → clipped}/app/views/admin/removed/_upload_to_page.html.haml +2 -2
  65. data/vendor/extensions/{assets → clipped}/app/views/admin/removed/bucket/_iframe.html.haml +0 -0
  66. data/vendor/extensions/{assets → clipped}/artwork/icons.png +0 -0
  67. data/vendor/extensions/{assets/assets_extension.rb → clipped/clipped_extension.rb} +10 -10
  68. data/vendor/extensions/{assets → clipped}/config/initializers/interpolation.rb +0 -0
  69. data/vendor/extensions/clipped/config/initializers/processors.rb +12 -0
  70. data/vendor/extensions/{assets → clipped}/config/initializers/radiant_config.rb +5 -4
  71. data/vendor/extensions/{assets → clipped}/config/locales/en.yml +6 -3
  72. data/vendor/extensions/{assets → clipped}/config/locales/nl.yml +1 -1
  73. data/vendor/extensions/{assets → clipped}/config/routes.rb +2 -2
  74. data/vendor/extensions/clipped/cucumber.yml +1 -0
  75. data/vendor/extensions/{assets → clipped}/db/migrate/001_create_assets.rb +0 -0
  76. data/vendor/extensions/{assets → clipped}/db/migrate/002_create_paperclip_attributes.rb +0 -0
  77. data/vendor/extensions/{assets → clipped}/db/migrate/003_create_user_observer.rb +0 -0
  78. data/vendor/extensions/{assets → clipped}/db/migrate/004_create_page_attachments.rb +0 -0
  79. data/vendor/extensions/{assets → clipped}/db/migrate/005_rename_users.rb +0 -0
  80. data/vendor/extensions/{assets → clipped}/db/migrate/20090316132151_disable_file_types.rb +0 -0
  81. data/vendor/extensions/{assets → clipped}/db/migrate/20110513205050_asset_uuid.rb +0 -0
  82. data/vendor/extensions/clipped/features/support/env.rb +11 -0
  83. data/vendor/extensions/clipped/features/support/paths.rb +22 -0
  84. data/vendor/extensions/{assets/lib/assets_admin_ui.rb → clipped/lib/clipped_admin_ui.rb} +1 -1
  85. data/vendor/extensions/{assets → clipped}/lib/page_asset_associations.rb +1 -1
  86. data/vendor/extensions/{assets → clipped}/lib/paperclip/frame_grab.rb +0 -0
  87. data/vendor/extensions/clipped/lib/radiant-clipped-extension.rb +2 -0
  88. data/vendor/extensions/clipped/lib/radiant-clipped-extension/version.rb +3 -0
  89. data/vendor/extensions/{assets/lib/tasks/assets_extension_tasks.rake → clipped/lib/tasks/clipped_extension_tasks.rake} +22 -16
  90. data/vendor/extensions/{assets → clipped}/lib/tasks/paperclip_tasks.rake +0 -0
  91. data/{public → vendor/extensions/clipped/public}/flash/ZeroClipboard.swf +0 -0
  92. data/{public → vendor/extensions/clipped/public}/images/admin/assets/add.png +0 -0
  93. data/{public → vendor/extensions/clipped/public}/images/admin/assets/archive_icon.png +0 -0
  94. data/{public → vendor/extensions/clipped/public}/images/admin/assets/audio_icon.png +0 -0
  95. data/{public → vendor/extensions/clipped/public}/images/admin/assets/audio_thumbnail.png +0 -0
  96. data/{public → vendor/extensions/clipped/public}/images/admin/assets/c_icon.png +0 -0
  97. data/{public → vendor/extensions/clipped/public}/images/admin/assets/copy.png +0 -0
  98. data/{public → vendor/extensions/clipped/public}/images/admin/assets/css_icon.png +0 -0
  99. data/{public → vendor/extensions/clipped/public}/images/admin/assets/database_icon.png +0 -0
  100. data/{public → vendor/extensions/clipped/public}/images/admin/assets/delete.png +0 -0
  101. data/{public → vendor/extensions/clipped/public}/images/admin/assets/document_icon.png +0 -0
  102. data/{public → vendor/extensions/clipped/public}/images/admin/assets/document_thumbnail.png +0 -0
  103. data/{public → vendor/extensions/clipped/public}/images/admin/assets/flash_icon.png +0 -0
  104. data/{public → vendor/extensions/clipped/public}/images/admin/assets/flash_thumbnail.png +0 -0
  105. data/{public → vendor/extensions/clipped/public}/images/admin/assets/font_icon.png +0 -0
  106. data/{public → vendor/extensions/clipped/public}/images/admin/assets/gzip_icon.png +0 -0
  107. data/{public → vendor/extensions/clipped/public}/images/admin/assets/html_icon.png +0 -0
  108. data/{public → vendor/extensions/clipped/public}/images/admin/assets/image_icon.png +0 -0
  109. data/{public → vendor/extensions/clipped/public}/images/admin/assets/image_thumbnail.png +0 -0
  110. data/{public → vendor/extensions/clipped/public}/images/admin/assets/java_icon.png +0 -0
  111. data/{public → vendor/extensions/clipped/public}/images/admin/assets/page_edit.png +0 -0
  112. data/{public → vendor/extensions/clipped/public}/images/admin/assets/perl_icon.png +0 -0
  113. data/{public → vendor/extensions/clipped/public}/images/admin/assets/php_icon.png +0 -0
  114. data/{public → vendor/extensions/clipped/public}/images/admin/assets/presentation_icon.png +0 -0
  115. data/{public → vendor/extensions/clipped/public}/images/admin/assets/python_icon.png +0 -0
  116. data/{public → vendor/extensions/clipped/public}/images/admin/assets/reorder_assets.png +0 -0
  117. data/{public → vendor/extensions/clipped/public}/images/admin/assets/ruby_icon.png +0 -0
  118. data/{public → vendor/extensions/clipped/public}/images/admin/assets/script_icon.png +0 -0
  119. data/{public → vendor/extensions/clipped/public}/images/admin/assets/spreadsheet_icon.png +0 -0
  120. data/{public → vendor/extensions/clipped/public}/images/admin/assets/tar_icon.png +0 -0
  121. data/{public → vendor/extensions/clipped/public}/images/admin/assets/unknown_icon.png +0 -0
  122. data/{public → vendor/extensions/clipped/public}/images/admin/assets/unknown_thumbnail.png +0 -0
  123. data/{public → vendor/extensions/clipped/public}/images/admin/assets/video_icon.png +0 -0
  124. data/{public → vendor/extensions/clipped/public}/images/admin/assets/video_thumbnail.png +0 -0
  125. data/{public → vendor/extensions/clipped/public}/images/admin/assets/xml_icon.png +0 -0
  126. data/{public → vendor/extensions/clipped/public}/images/admin/assets/zip_icon.png +0 -0
  127. data/vendor/extensions/{assets → clipped}/public/javascripts/admin/assets.js +66 -8
  128. data/vendor/extensions/{assets → clipped}/public/stylesheets/sass/admin/assets.sass +12 -6
  129. data/vendor/extensions/clipped/radiant-clipped-extension.gemspec +33 -0
  130. data/vendor/extensions/{assets → clipped}/spec/controllers/admin/assets_controller_spec.rb +0 -0
  131. data/vendor/extensions/clipped/spec/controllers/admin/page_attachments_controller_spec.rb +50 -0
  132. data/vendor/extensions/{assets → clipped}/spec/datasets/assets_dataset.rb +2 -1
  133. data/vendor/extensions/{assets/spec/lib/tag_deprecation_spec.rb → clipped/spec/lib/asset_tags_spec.rb} +3 -15
  134. data/vendor/extensions/{assets → clipped}/spec/models/asset_spec.rb +3 -2
  135. data/vendor/extensions/{assets → clipped}/spec/models/asset_type_spec.rb +0 -0
  136. data/vendor/extensions/{assets → clipped}/spec/spec.opts +0 -0
  137. data/vendor/extensions/{assets → clipped}/spec/spec_helper.rb +0 -0
  138. data/vendor/extensions/{assets → clipped}/wireframes/edit-page-assets-2.bmml +0 -0
  139. data/vendor/extensions/{assets → clipped}/wireframes/edit-page-assets-2.png +0 -0
  140. data/vendor/extensions/{assets → clipped}/wireframes/edit-page-assets-3.bmml +0 -0
  141. data/vendor/extensions/{assets → clipped}/wireframes/edit-page-assets-3.png +0 -0
  142. data/vendor/extensions/{assets → clipped}/wireframes/edit-page-assets.bmml +0 -0
  143. data/vendor/extensions/{assets → clipped}/wireframes/edit-page-assets.png +0 -0
  144. data/vendor/extensions/{assets → clipped}/wireframes/edit-page.bmml +0 -0
  145. data/vendor/extensions/{assets → clipped}/wireframes/edit-page.png +0 -0
  146. data/vendor/extensions/sheets/Rakefile +30 -18
  147. data/vendor/extensions/sheets/app/controllers/admin/sheet_resource_controller.rb +1 -1
  148. data/vendor/extensions/sheets/app/models/sheet.rb +4 -0
  149. data/vendor/extensions/sheets/app/views/admin/scripts/index.html.haml +9 -5
  150. data/vendor/extensions/sheets/app/views/admin/styles/index.html.haml +1 -1
  151. data/vendor/extensions/sheets/config/locales/en.yml +3 -1
  152. data/vendor/extensions/sheets/features/admin/managing_javascripts.feature +65 -0
  153. data/vendor/extensions/sheets/features/admin/managing_stylesheets.feature +65 -0
  154. data/vendor/extensions/sheets/features/support/env.rb +2 -7
  155. data/vendor/extensions/sheets/features/support/paths.rb +9 -12
  156. data/vendor/extensions/sheets/lib/radiant-sheets-extension/version.rb +1 -1
  157. data/vendor/extensions/sheets/radiant-sheets-extension.gemspec +9 -4
  158. data/vendor/extensions/sheets/spec/datasets/javascripts_dataset.rb +3 -1
  159. data/vendor/extensions/sheets/spec/datasets/stylesheets_dataset.rb +3 -1
  160. data/vendor/extensions/sheets/spec/lib/javascript_tags_spec.rb +4 -4
  161. data/vendor/extensions/sheets/spec/lib/stylesheet_tags_spec.rb +4 -4
  162. metadata +189 -599
  163. data/Gemfile +0 -3
  164. data/lib/generators/extension/templates/cucumber_datasets_loader.rb +0 -3
  165. data/public/assets/1/2375_1115822414591_1197894784_30347214_1109_n.jpg +0 -0
  166. data/public/assets/1/2375_1115822414591_1197894784_30347214_1109_n_icon.png +0 -0
  167. data/public/assets/1/2375_1115822414591_1197894784_30347214_1109_n_normal.jpg +0 -0
  168. data/public/assets/1/2375_1115822414591_1197894784_30347214_1109_n_thumbnail.png +0 -0
  169. data/public/images/roasters/banner.jpg +0 -0
  170. data/public/images/roasters/closelabel.gif +0 -0
  171. data/public/images/roasters/comment.png +0 -0
  172. data/public/images/roasters/gallery1.jpg +0 -0
  173. data/public/images/roasters/gallery2.jpg +0 -0
  174. data/public/images/roasters/gallery3.jpg +0 -0
  175. data/public/images/roasters/gallery4.jpg +0 -0
  176. data/public/images/roasters/gift.gif +0 -0
  177. data/public/images/roasters/green.gif +0 -0
  178. data/public/images/roasters/nav-background.gif +0 -0
  179. data/public/images/roasters/nav-divider.gif +0 -0
  180. data/public/images/roasters/nextlabel.gif +0 -0
  181. data/public/images/roasters/open.gif +0 -0
  182. data/public/images/roasters/preview-1.jpg +0 -0
  183. data/public/images/roasters/preview.jpg +0 -0
  184. data/public/images/roasters/prevlabel.gif +0 -0
  185. data/public/images/roasters/prize.gif +0 -0
  186. data/public/images/roasters/recycle.gif +0 -0
  187. data/public/images/roasters/rss.gif +0 -0
  188. data/public/images/roasters/thumb-grinder.jpg +0 -0
  189. data/public/images/roasters/thumb-grower.jpg +0 -0
  190. data/public/images/roasters/thumb-roaster.jpg +0 -0
  191. data/public/images/roasters/truck.gif +0 -0
  192. data/vendor/extensions/assets/HELP_admin.markdown +0 -69
  193. data/vendor/extensions/assets/VERSION +0 -1
  194. data/vendor/extensions/assets/app/controllers/admin/page_attachments_controller.rb +0 -45
  195. data/vendor/extensions/assets/app/helpers/admin/assets_helper.rb +0 -11
  196. data/vendor/extensions/assets/app/models/page_attachment.rb +0 -14
  197. data/vendor/extensions/assets/app/views/admin/assets/_errors.html.haml +0 -3
  198. data/vendor/extensions/assets/app/views/admin/page_attachments/_attachment.html.haml +0 -22
  199. data/vendor/extensions/assets/app/views/admin/page_attachments/_new_attachment.html.haml +0 -18
  200. data/vendor/extensions/assets/app/views/admin/pages/_assets.html.haml +0 -13
  201. data/vendor/extensions/assets/app/views/admin/removed/_show_bucket_link.html.haml +0 -4
  202. data/vendor/extensions/assets/lib/tag_deprecation.rb +0 -73
  203. data/vendor/extensions/assets/public/flash/ZeroClipboard.swf +0 -0
  204. data/vendor/extensions/assets/public/images/admin/assets/add.png +0 -0
  205. data/vendor/extensions/assets/public/images/admin/assets/archive_icon.png +0 -0
  206. data/vendor/extensions/assets/public/images/admin/assets/audio_icon.png +0 -0
  207. data/vendor/extensions/assets/public/images/admin/assets/audio_thumbnail.png +0 -0
  208. data/vendor/extensions/assets/public/images/admin/assets/c_icon.png +0 -0
  209. data/vendor/extensions/assets/public/images/admin/assets/copy.png +0 -0
  210. data/vendor/extensions/assets/public/images/admin/assets/css_icon.png +0 -0
  211. data/vendor/extensions/assets/public/images/admin/assets/database_icon.png +0 -0
  212. data/vendor/extensions/assets/public/images/admin/assets/delete.png +0 -0
  213. data/vendor/extensions/assets/public/images/admin/assets/document_icon.png +0 -0
  214. data/vendor/extensions/assets/public/images/admin/assets/document_thumbnail.png +0 -0
  215. data/vendor/extensions/assets/public/images/admin/assets/flash_icon.png +0 -0
  216. data/vendor/extensions/assets/public/images/admin/assets/flash_thumbnail.png +0 -0
  217. data/vendor/extensions/assets/public/images/admin/assets/font_icon.png +0 -0
  218. data/vendor/extensions/assets/public/images/admin/assets/gzip_icon.png +0 -0
  219. data/vendor/extensions/assets/public/images/admin/assets/html_icon.png +0 -0
  220. data/vendor/extensions/assets/public/images/admin/assets/image_icon.png +0 -0
  221. data/vendor/extensions/assets/public/images/admin/assets/image_thumbnail.png +0 -0
  222. data/vendor/extensions/assets/public/images/admin/assets/java_icon.png +0 -0
  223. data/vendor/extensions/assets/public/images/admin/assets/page_edit.png +0 -0
  224. data/vendor/extensions/assets/public/images/admin/assets/perl_icon.png +0 -0
  225. data/vendor/extensions/assets/public/images/admin/assets/php_icon.png +0 -0
  226. data/vendor/extensions/assets/public/images/admin/assets/presentation_icon.png +0 -0
  227. data/vendor/extensions/assets/public/images/admin/assets/python_icon.png +0 -0
  228. data/vendor/extensions/assets/public/images/admin/assets/reorder_assets.png +0 -0
  229. data/vendor/extensions/assets/public/images/admin/assets/ruby_icon.png +0 -0
  230. data/vendor/extensions/assets/public/images/admin/assets/script_icon.png +0 -0
  231. data/vendor/extensions/assets/public/images/admin/assets/spreadsheet_icon.png +0 -0
  232. data/vendor/extensions/assets/public/images/admin/assets/tar_icon.png +0 -0
  233. data/vendor/extensions/assets/public/images/admin/assets/unknown_icon.png +0 -0
  234. data/vendor/extensions/assets/public/images/admin/assets/unknown_thumbnail.png +0 -0
  235. data/vendor/extensions/assets/public/images/admin/assets/video_icon.png +0 -0
  236. data/vendor/extensions/assets/public/images/admin/assets/video_thumbnail.png +0 -0
  237. data/vendor/extensions/assets/public/images/admin/assets/xml_icon.png +0 -0
  238. data/vendor/extensions/assets/public/images/admin/assets/zip_icon.png +0 -0
  239. data/vendor/extensions/assets/spec/controllers/admin/page_attachment_controller_spec.rb +0 -51
  240. data/vendor/extensions/assets/spec/lib/asset_tags_spec.rb +0 -9
  241. data/vendor/plugins/haml/CONTRIBUTING +0 -4
  242. data/vendor/plugins/haml/MIT-LICENSE +0 -20
  243. data/vendor/plugins/haml/README.md +0 -298
  244. data/vendor/plugins/haml/Rakefile +0 -436
  245. data/vendor/plugins/haml/TODO +0 -53
  246. data/vendor/plugins/haml/VERSION +0 -1
  247. data/vendor/plugins/haml/VERSION_NAME +0 -1
  248. data/vendor/plugins/haml/bin/css2sass +0 -13
  249. data/vendor/plugins/haml/bin/haml +0 -9
  250. data/vendor/plugins/haml/bin/html2haml +0 -7
  251. data/vendor/plugins/haml/bin/sass +0 -8
  252. data/vendor/plugins/haml/bin/sass-convert +0 -7
  253. data/vendor/plugins/haml/doc-src/FAQ.md +0 -187
  254. data/vendor/plugins/haml/doc-src/HAML_CHANGELOG.md +0 -1091
  255. data/vendor/plugins/haml/doc-src/HAML_REFERENCE.md +0 -1344
  256. data/vendor/plugins/haml/doc-src/INDENTED_SYNTAX.md +0 -210
  257. data/vendor/plugins/haml/doc-src/SASS_CHANGELOG.md +0 -1914
  258. data/vendor/plugins/haml/doc-src/SASS_REFERENCE.md +0 -1680
  259. data/vendor/plugins/haml/doc-src/SCSS_FOR_SASS_USERS.md +0 -155
  260. data/vendor/plugins/haml/ext/extconf.rb +0 -10
  261. data/vendor/plugins/haml/extra/haml-mode.el +0 -753
  262. data/vendor/plugins/haml/extra/sass-mode.el +0 -207
  263. data/vendor/plugins/haml/extra/update_watch.rb +0 -13
  264. data/vendor/plugins/haml/haml.gemspec +0 -35
  265. data/vendor/plugins/haml/init.rb +0 -18
  266. data/vendor/plugins/haml/init.rbc +0 -404
  267. data/vendor/plugins/haml/lib/haml.rb +0 -44
  268. data/vendor/plugins/haml/lib/haml.rbc +0 -569
  269. data/vendor/plugins/haml/lib/haml/buffer.rb +0 -320
  270. data/vendor/plugins/haml/lib/haml/buffer.rbc +0 -4048
  271. data/vendor/plugins/haml/lib/haml/engine.rb +0 -308
  272. data/vendor/plugins/haml/lib/haml/engine.rbc +0 -3852
  273. data/vendor/plugins/haml/lib/haml/error.rb +0 -22
  274. data/vendor/plugins/haml/lib/haml/error.rbc +0 -339
  275. data/vendor/plugins/haml/lib/haml/exec.rb +0 -862
  276. data/vendor/plugins/haml/lib/haml/filters.rb +0 -371
  277. data/vendor/plugins/haml/lib/haml/filters.rbc +0 -5617
  278. data/vendor/plugins/haml/lib/haml/helpers.rb +0 -605
  279. data/vendor/plugins/haml/lib/haml/helpers.rbc +0 -7086
  280. data/vendor/plugins/haml/lib/haml/helpers/action_view_extensions.rb +0 -57
  281. data/vendor/plugins/haml/lib/haml/helpers/action_view_extensions.rbc +0 -522
  282. data/vendor/plugins/haml/lib/haml/helpers/action_view_mods.rb +0 -244
  283. data/vendor/plugins/haml/lib/haml/helpers/action_view_mods.rbc +0 -5515
  284. data/vendor/plugins/haml/lib/haml/helpers/xss_mods.rb +0 -165
  285. data/vendor/plugins/haml/lib/haml/html.rb +0 -428
  286. data/vendor/plugins/haml/lib/haml/html/erb.rb +0 -141
  287. data/vendor/plugins/haml/lib/haml/precompiler.rb +0 -1104
  288. data/vendor/plugins/haml/lib/haml/precompiler.rbc +0 -22247
  289. data/vendor/plugins/haml/lib/haml/railtie.rb +0 -21
  290. data/vendor/plugins/haml/lib/haml/railtie.rbc +0 -409
  291. data/vendor/plugins/haml/lib/haml/root.rb +0 -7
  292. data/vendor/plugins/haml/lib/haml/root.rbc +0 -160
  293. data/vendor/plugins/haml/lib/haml/shared.rb +0 -78
  294. data/vendor/plugins/haml/lib/haml/shared.rbc +0 -1137
  295. data/vendor/plugins/haml/lib/haml/template.rb +0 -97
  296. data/vendor/plugins/haml/lib/haml/template.rbc +0 -1838
  297. data/vendor/plugins/haml/lib/haml/template/options.rb +0 -16
  298. data/vendor/plugins/haml/lib/haml/template/options.rbc +0 -235
  299. data/vendor/plugins/haml/lib/haml/template/patch.rb +0 -58
  300. data/vendor/plugins/haml/lib/haml/template/plugin.rb +0 -122
  301. data/vendor/plugins/haml/lib/haml/template/plugin.rbc +0 -2720
  302. data/vendor/plugins/haml/lib/haml/util.rb +0 -809
  303. data/vendor/plugins/haml/lib/haml/util.rbc +0 -12059
  304. data/vendor/plugins/haml/lib/haml/util/subset_map.rb +0 -101
  305. data/vendor/plugins/haml/lib/haml/util/subset_map.rbc +0 -1316
  306. data/vendor/plugins/haml/lib/haml/version.rb +0 -102
  307. data/vendor/plugins/haml/lib/haml/version.rbc +0 -1671
  308. data/vendor/plugins/haml/lib/sass.rb +0 -29
  309. data/vendor/plugins/haml/lib/sass.rbc +0 -492
  310. data/vendor/plugins/haml/lib/sass/callbacks.rb +0 -52
  311. data/vendor/plugins/haml/lib/sass/callbacks.rbc +0 -388
  312. data/vendor/plugins/haml/lib/sass/css.rb +0 -294
  313. data/vendor/plugins/haml/lib/sass/engine.rb +0 -720
  314. data/vendor/plugins/haml/lib/sass/engine.rbc +0 -17020
  315. data/vendor/plugins/haml/lib/sass/environment.rb +0 -143
  316. data/vendor/plugins/haml/lib/sass/environment.rbc +0 -1751
  317. data/vendor/plugins/haml/lib/sass/error.rb +0 -198
  318. data/vendor/plugins/haml/lib/sass/error.rbc +0 -2801
  319. data/vendor/plugins/haml/lib/sass/files.rb +0 -160
  320. data/vendor/plugins/haml/lib/sass/files.rbc +0 -3118
  321. data/vendor/plugins/haml/lib/sass/less.rb +0 -382
  322. data/vendor/plugins/haml/lib/sass/plugin.rb +0 -276
  323. data/vendor/plugins/haml/lib/sass/plugin.rbc +0 -4356
  324. data/vendor/plugins/haml/lib/sass/plugin/configuration.rb +0 -221
  325. data/vendor/plugins/haml/lib/sass/plugin/configuration.rbc +0 -1343
  326. data/vendor/plugins/haml/lib/sass/plugin/generic.rb +0 -15
  327. data/vendor/plugins/haml/lib/sass/plugin/merb.rb +0 -37
  328. data/vendor/plugins/haml/lib/sass/plugin/rack.rb +0 -47
  329. data/vendor/plugins/haml/lib/sass/plugin/rack.rbc +0 -446
  330. data/vendor/plugins/haml/lib/sass/plugin/rails.rb +0 -32
  331. data/vendor/plugins/haml/lib/sass/plugin/rails.rbc +0 -879
  332. data/vendor/plugins/haml/lib/sass/plugin/staleness_checker.rb +0 -123
  333. data/vendor/plugins/haml/lib/sass/plugin/staleness_checker.rbc +0 -2019
  334. data/vendor/plugins/haml/lib/sass/repl.rb +0 -58
  335. data/vendor/plugins/haml/lib/sass/script.rb +0 -63
  336. data/vendor/plugins/haml/lib/sass/script.rbc +0 -1188
  337. data/vendor/plugins/haml/lib/sass/script/bool.rb +0 -18
  338. data/vendor/plugins/haml/lib/sass/script/bool.rbc +0 -366
  339. data/vendor/plugins/haml/lib/sass/script/color.rb +0 -491
  340. data/vendor/plugins/haml/lib/sass/script/color.rbc +0 -8148
  341. data/vendor/plugins/haml/lib/sass/script/css_lexer.rb +0 -29
  342. data/vendor/plugins/haml/lib/sass/script/css_lexer.rbc +0 -809
  343. data/vendor/plugins/haml/lib/sass/script/css_parser.rb +0 -31
  344. data/vendor/plugins/haml/lib/sass/script/css_parser.rbc +0 -628
  345. data/vendor/plugins/haml/lib/sass/script/funcall.rb +0 -77
  346. data/vendor/plugins/haml/lib/sass/script/funcall.rbc +0 -1805
  347. data/vendor/plugins/haml/lib/sass/script/functions.rb +0 -861
  348. data/vendor/plugins/haml/lib/sass/script/functions.rbc +0 -8418
  349. data/vendor/plugins/haml/lib/sass/script/interpolation.rb +0 -70
  350. data/vendor/plugins/haml/lib/sass/script/interpolation.rbc +0 -1225
  351. data/vendor/plugins/haml/lib/sass/script/lexer.rb +0 -337
  352. data/vendor/plugins/haml/lib/sass/script/lexer.rbc +0 -7231
  353. data/vendor/plugins/haml/lib/sass/script/literal.rb +0 -236
  354. data/vendor/plugins/haml/lib/sass/script/literal.rbc +0 -3365
  355. data/vendor/plugins/haml/lib/sass/script/node.rb +0 -112
  356. data/vendor/plugins/haml/lib/sass/script/node.rbc +0 -1418
  357. data/vendor/plugins/haml/lib/sass/script/number.rb +0 -423
  358. data/vendor/plugins/haml/lib/sass/script/number.rbc +0 -6024
  359. data/vendor/plugins/haml/lib/sass/script/operation.rb +0 -95
  360. data/vendor/plugins/haml/lib/sass/script/operation.rbc +0 -1856
  361. data/vendor/plugins/haml/lib/sass/script/parser.rb +0 -401
  362. data/vendor/plugins/haml/lib/sass/script/parser.rbc +0 -8418
  363. data/vendor/plugins/haml/lib/sass/script/string.rb +0 -67
  364. data/vendor/plugins/haml/lib/sass/script/string.rbc +0 -1357
  365. data/vendor/plugins/haml/lib/sass/script/string_interpolation.rb +0 -93
  366. data/vendor/plugins/haml/lib/sass/script/string_interpolation.rbc +0 -1643
  367. data/vendor/plugins/haml/lib/sass/script/unary_operation.rb +0 -57
  368. data/vendor/plugins/haml/lib/sass/script/unary_operation.rbc +0 -1144
  369. data/vendor/plugins/haml/lib/sass/script/variable.rb +0 -48
  370. data/vendor/plugins/haml/lib/sass/script/variable.rbc +0 -844
  371. data/vendor/plugins/haml/lib/sass/scss.rb +0 -17
  372. data/vendor/plugins/haml/lib/sass/scss.rbc +0 -242
  373. data/vendor/plugins/haml/lib/sass/scss/css_parser.rb +0 -46
  374. data/vendor/plugins/haml/lib/sass/scss/css_parser.rbc +0 -1106
  375. data/vendor/plugins/haml/lib/sass/scss/parser.rb +0 -846
  376. data/vendor/plugins/haml/lib/sass/scss/parser.rbc +0 -19348
  377. data/vendor/plugins/haml/lib/sass/scss/rx.rb +0 -126
  378. data/vendor/plugins/haml/lib/sass/scss/rx.rbc +0 -2849
  379. data/vendor/plugins/haml/lib/sass/scss/sass_parser.rb +0 -11
  380. data/vendor/plugins/haml/lib/sass/scss/sass_parser.rbc +0 -287
  381. data/vendor/plugins/haml/lib/sass/scss/script_lexer.rb +0 -15
  382. data/vendor/plugins/haml/lib/sass/scss/script_lexer.rbc +0 -439
  383. data/vendor/plugins/haml/lib/sass/scss/script_parser.rb +0 -25
  384. data/vendor/plugins/haml/lib/sass/scss/script_parser.rbc +0 -482
  385. data/vendor/plugins/haml/lib/sass/scss/static_parser.rb +0 -40
  386. data/vendor/plugins/haml/lib/sass/scss/static_parser.rbc +0 -971
  387. data/vendor/plugins/haml/lib/sass/selector.rb +0 -361
  388. data/vendor/plugins/haml/lib/sass/selector.rbc +0 -4193
  389. data/vendor/plugins/haml/lib/sass/selector/abstract_sequence.rb +0 -62
  390. data/vendor/plugins/haml/lib/sass/selector/abstract_sequence.rbc +0 -798
  391. data/vendor/plugins/haml/lib/sass/selector/comma_sequence.rb +0 -82
  392. data/vendor/plugins/haml/lib/sass/selector/comma_sequence.rbc +0 -1814
  393. data/vendor/plugins/haml/lib/sass/selector/sequence.rb +0 -237
  394. data/vendor/plugins/haml/lib/sass/selector/sequence.rbc +0 -4928
  395. data/vendor/plugins/haml/lib/sass/selector/simple.rb +0 -113
  396. data/vendor/plugins/haml/lib/sass/selector/simple.rbc +0 -1553
  397. data/vendor/plugins/haml/lib/sass/selector/simple_sequence.rb +0 -136
  398. data/vendor/plugins/haml/lib/sass/selector/simple_sequence.rbc +0 -2346
  399. data/vendor/plugins/haml/lib/sass/tree/charset_node.rb +0 -37
  400. data/vendor/plugins/haml/lib/sass/tree/charset_node.rbc +0 -606
  401. data/vendor/plugins/haml/lib/sass/tree/comment_node.rb +0 -128
  402. data/vendor/plugins/haml/lib/sass/tree/comment_node.rbc +0 -2397
  403. data/vendor/plugins/haml/lib/sass/tree/debug_node.rb +0 -36
  404. data/vendor/plugins/haml/lib/sass/tree/debug_node.rbc +0 -740
  405. data/vendor/plugins/haml/lib/sass/tree/directive_node.rb +0 -75
  406. data/vendor/plugins/haml/lib/sass/tree/directive_node.rbc +0 -1302
  407. data/vendor/plugins/haml/lib/sass/tree/extend_node.rb +0 -65
  408. data/vendor/plugins/haml/lib/sass/tree/extend_node.rbc +0 -1276
  409. data/vendor/plugins/haml/lib/sass/tree/for_node.rb +0 -67
  410. data/vendor/plugins/haml/lib/sass/tree/for_node.rbc +0 -1145
  411. data/vendor/plugins/haml/lib/sass/tree/if_node.rb +0 -81
  412. data/vendor/plugins/haml/lib/sass/tree/if_node.rbc +0 -1119
  413. data/vendor/plugins/haml/lib/sass/tree/import_node.rb +0 -102
  414. data/vendor/plugins/haml/lib/sass/tree/import_node.rbc +0 -2242
  415. data/vendor/plugins/haml/lib/sass/tree/mixin_def_node.rb +0 -60
  416. data/vendor/plugins/haml/lib/sass/tree/mixin_def_node.rbc +0 -1001
  417. data/vendor/plugins/haml/lib/sass/tree/mixin_node.rb +0 -123
  418. data/vendor/plugins/haml/lib/sass/tree/mixin_node.rbc +0 -3355
  419. data/vendor/plugins/haml/lib/sass/tree/node.rb +0 -465
  420. data/vendor/plugins/haml/lib/sass/tree/node.rbc +0 -5533
  421. data/vendor/plugins/haml/lib/sass/tree/prop_node.rb +0 -220
  422. data/vendor/plugins/haml/lib/sass/tree/prop_node.rbc +0 -3949
  423. data/vendor/plugins/haml/lib/sass/tree/root_node.rb +0 -157
  424. data/vendor/plugins/haml/lib/sass/tree/root_node.rbc +0 -3112
  425. data/vendor/plugins/haml/lib/sass/tree/rule_node.rb +0 -273
  426. data/vendor/plugins/haml/lib/sass/tree/rule_node.rbc +0 -5636
  427. data/vendor/plugins/haml/lib/sass/tree/variable_node.rb +0 -39
  428. data/vendor/plugins/haml/lib/sass/tree/variable_node.rbc +0 -845
  429. data/vendor/plugins/haml/lib/sass/tree/warn_node.rb +0 -42
  430. data/vendor/plugins/haml/lib/sass/tree/warn_node.rbc +0 -1043
  431. data/vendor/plugins/haml/lib/sass/tree/while_node.rb +0 -48
  432. data/vendor/plugins/haml/lib/sass/tree/while_node.rbc +0 -722
  433. data/vendor/plugins/haml/rails/init.rb +0 -1
  434. data/vendor/plugins/haml/test/benchmark.rb +0 -99
  435. data/vendor/plugins/haml/test/haml/engine_test.rb +0 -1805
  436. data/vendor/plugins/haml/test/haml/erb/_av_partial_1.erb +0 -12
  437. data/vendor/plugins/haml/test/haml/erb/_av_partial_2.erb +0 -8
  438. data/vendor/plugins/haml/test/haml/erb/action_view.erb +0 -62
  439. data/vendor/plugins/haml/test/haml/erb/standard.erb +0 -54
  440. data/vendor/plugins/haml/test/haml/helper_test.rb +0 -450
  441. data/vendor/plugins/haml/test/haml/html2haml/erb_tests.rb +0 -426
  442. data/vendor/plugins/haml/test/haml/html2haml_test.rb +0 -336
  443. data/vendor/plugins/haml/test/haml/markaby/standard.mab +0 -52
  444. data/vendor/plugins/haml/test/haml/mocks/article.rb +0 -6
  445. data/vendor/plugins/haml/test/haml/results/content_for_layout.xhtml +0 -12
  446. data/vendor/plugins/haml/test/haml/results/eval_suppressed.xhtml +0 -9
  447. data/vendor/plugins/haml/test/haml/results/filters.xhtml +0 -62
  448. data/vendor/plugins/haml/test/haml/results/helpers.xhtml +0 -70
  449. data/vendor/plugins/haml/test/haml/results/helpful.xhtml +0 -10
  450. data/vendor/plugins/haml/test/haml/results/just_stuff.xhtml +0 -70
  451. data/vendor/plugins/haml/test/haml/results/list.xhtml +0 -12
  452. data/vendor/plugins/haml/test/haml/results/nuke_inner_whitespace.xhtml +0 -40
  453. data/vendor/plugins/haml/test/haml/results/nuke_outer_whitespace.xhtml +0 -148
  454. data/vendor/plugins/haml/test/haml/results/original_engine.xhtml +0 -20
  455. data/vendor/plugins/haml/test/haml/results/partial_layout.xhtml +0 -5
  456. data/vendor/plugins/haml/test/haml/results/partials.xhtml +0 -21
  457. data/vendor/plugins/haml/test/haml/results/render_layout.xhtml +0 -3
  458. data/vendor/plugins/haml/test/haml/results/silent_script.xhtml +0 -74
  459. data/vendor/plugins/haml/test/haml/results/standard.xhtml +0 -162
  460. data/vendor/plugins/haml/test/haml/results/tag_parsing.xhtml +0 -23
  461. data/vendor/plugins/haml/test/haml/results/very_basic.xhtml +0 -5
  462. data/vendor/plugins/haml/test/haml/results/whitespace_handling.xhtml +0 -89
  463. data/vendor/plugins/haml/test/haml/spec/LICENSE +0 -14
  464. data/vendor/plugins/haml/test/haml/spec/README.md +0 -106
  465. data/vendor/plugins/haml/test/haml/spec/lua_haml_spec.lua +0 -38
  466. data/vendor/plugins/haml/test/haml/spec/perl_haml_test.pl +0 -81
  467. data/vendor/plugins/haml/test/haml/spec/ruby_haml_test.rb +0 -19
  468. data/vendor/plugins/haml/test/haml/spec/tests.json +0 -603
  469. data/vendor/plugins/haml/test/haml/spec_test.rb +0 -44
  470. data/vendor/plugins/haml/test/haml/template_test.rb +0 -417
  471. data/vendor/plugins/haml/test/haml/templates/_av_partial_1.haml +0 -9
  472. data/vendor/plugins/haml/test/haml/templates/_av_partial_1_ugly.haml +0 -9
  473. data/vendor/plugins/haml/test/haml/templates/_av_partial_2.haml +0 -5
  474. data/vendor/plugins/haml/test/haml/templates/_av_partial_2_ugly.haml +0 -5
  475. data/vendor/plugins/haml/test/haml/templates/_layout.erb +0 -3
  476. data/vendor/plugins/haml/test/haml/templates/_layout_for_partial.haml +0 -3
  477. data/vendor/plugins/haml/test/haml/templates/_partial.haml +0 -8
  478. data/vendor/plugins/haml/test/haml/templates/_text_area.haml +0 -3
  479. data/vendor/plugins/haml/test/haml/templates/action_view.haml +0 -47
  480. data/vendor/plugins/haml/test/haml/templates/action_view_ugly.haml +0 -47
  481. data/vendor/plugins/haml/test/haml/templates/breakage.haml +0 -8
  482. data/vendor/plugins/haml/test/haml/templates/content_for_layout.haml +0 -8
  483. data/vendor/plugins/haml/test/haml/templates/eval_suppressed.haml +0 -11
  484. data/vendor/plugins/haml/test/haml/templates/filters.haml +0 -66
  485. data/vendor/plugins/haml/test/haml/templates/helpers.haml +0 -55
  486. data/vendor/plugins/haml/test/haml/templates/helpful.haml +0 -11
  487. data/vendor/plugins/haml/test/haml/templates/just_stuff.haml +0 -85
  488. data/vendor/plugins/haml/test/haml/templates/list.haml +0 -12
  489. data/vendor/plugins/haml/test/haml/templates/nuke_inner_whitespace.haml +0 -32
  490. data/vendor/plugins/haml/test/haml/templates/nuke_outer_whitespace.haml +0 -144
  491. data/vendor/plugins/haml/test/haml/templates/original_engine.haml +0 -17
  492. data/vendor/plugins/haml/test/haml/templates/partial_layout.haml +0 -7
  493. data/vendor/plugins/haml/test/haml/templates/partialize.haml +0 -1
  494. data/vendor/plugins/haml/test/haml/templates/partials.haml +0 -12
  495. data/vendor/plugins/haml/test/haml/templates/render_layout.haml +0 -2
  496. data/vendor/plugins/haml/test/haml/templates/silent_script.haml +0 -40
  497. data/vendor/plugins/haml/test/haml/templates/standard.haml +0 -42
  498. data/vendor/plugins/haml/test/haml/templates/standard_ugly.haml +0 -42
  499. data/vendor/plugins/haml/test/haml/templates/tag_parsing.haml +0 -21
  500. data/vendor/plugins/haml/test/haml/templates/very_basic.haml +0 -4
  501. data/vendor/plugins/haml/test/haml/templates/whitespace_handling.haml +0 -87
  502. data/vendor/plugins/haml/test/haml/util/subset_map_test.rb +0 -91
  503. data/vendor/plugins/haml/test/haml/util_test.rb +0 -268
  504. data/vendor/plugins/haml/test/linked_rails.rb +0 -42
  505. data/vendor/plugins/haml/test/sass/callbacks_test.rb +0 -61
  506. data/vendor/plugins/haml/test/sass/conversion_test.rb +0 -1218
  507. data/vendor/plugins/haml/test/sass/css2sass_test.rb +0 -364
  508. data/vendor/plugins/haml/test/sass/data/hsl-rgb.txt +0 -319
  509. data/vendor/plugins/haml/test/sass/engine_test.rb +0 -2263
  510. data/vendor/plugins/haml/test/sass/extend_test.rb +0 -1348
  511. data/vendor/plugins/haml/test/sass/functions_test.rb +0 -556
  512. data/vendor/plugins/haml/test/sass/less_conversion_test.rb +0 -653
  513. data/vendor/plugins/haml/test/sass/more_results/more1.css +0 -9
  514. data/vendor/plugins/haml/test/sass/more_results/more1_with_line_comments.css +0 -26
  515. data/vendor/plugins/haml/test/sass/more_results/more_import.css +0 -29
  516. data/vendor/plugins/haml/test/sass/more_templates/_more_partial.sass +0 -2
  517. data/vendor/plugins/haml/test/sass/more_templates/more1.sass +0 -23
  518. data/vendor/plugins/haml/test/sass/more_templates/more_import.sass +0 -11
  519. data/vendor/plugins/haml/test/sass/plugin_test.rb +0 -433
  520. data/vendor/plugins/haml/test/sass/results/alt.css +0 -4
  521. data/vendor/plugins/haml/test/sass/results/basic.css +0 -9
  522. data/vendor/plugins/haml/test/sass/results/compact.css +0 -5
  523. data/vendor/plugins/haml/test/sass/results/complex.css +0 -86
  524. data/vendor/plugins/haml/test/sass/results/compressed.css +0 -1
  525. data/vendor/plugins/haml/test/sass/results/expanded.css +0 -19
  526. data/vendor/plugins/haml/test/sass/results/import.css +0 -31
  527. data/vendor/plugins/haml/test/sass/results/import_charset.css +0 -4
  528. data/vendor/plugins/haml/test/sass/results/import_charset_1_8.css +0 -4
  529. data/vendor/plugins/haml/test/sass/results/import_charset_ibm866.css +0 -4
  530. data/vendor/plugins/haml/test/sass/results/line_numbers.css +0 -49
  531. data/vendor/plugins/haml/test/sass/results/mixins.css +0 -95
  532. data/vendor/plugins/haml/test/sass/results/multiline.css +0 -24
  533. data/vendor/plugins/haml/test/sass/results/nested.css +0 -22
  534. data/vendor/plugins/haml/test/sass/results/options.css +0 -1
  535. data/vendor/plugins/haml/test/sass/results/parent_ref.css +0 -13
  536. data/vendor/plugins/haml/test/sass/results/script.css +0 -16
  537. data/vendor/plugins/haml/test/sass/results/scss_import.css +0 -31
  538. data/vendor/plugins/haml/test/sass/results/scss_importee.css +0 -2
  539. data/vendor/plugins/haml/test/sass/results/subdir/nested_subdir/nested_subdir.css +0 -1
  540. data/vendor/plugins/haml/test/sass/results/subdir/subdir.css +0 -3
  541. data/vendor/plugins/haml/test/sass/results/units.css +0 -11
  542. data/vendor/plugins/haml/test/sass/results/warn_imported.css +0 -0
  543. data/vendor/plugins/haml/test/sass/script_conversion_test.rb +0 -314
  544. data/vendor/plugins/haml/test/sass/script_test.rb +0 -470
  545. data/vendor/plugins/haml/test/sass/scss/css_test.rb +0 -916
  546. data/vendor/plugins/haml/test/sass/scss/rx_test.rb +0 -156
  547. data/vendor/plugins/haml/test/sass/scss/scss_test.rb +0 -1088
  548. data/vendor/plugins/haml/test/sass/scss/test_helper.rb +0 -37
  549. data/vendor/plugins/haml/test/sass/templates/_imported_charset_ibm866.sass +0 -4
  550. data/vendor/plugins/haml/test/sass/templates/_imported_charset_utf8.sass +0 -4
  551. data/vendor/plugins/haml/test/sass/templates/_partial.sass +0 -2
  552. data/vendor/plugins/haml/test/sass/templates/alt.sass +0 -16
  553. data/vendor/plugins/haml/test/sass/templates/basic.sass +0 -23
  554. data/vendor/plugins/haml/test/sass/templates/bork1.sass +0 -2
  555. data/vendor/plugins/haml/test/sass/templates/bork2.sass +0 -2
  556. data/vendor/plugins/haml/test/sass/templates/bork3.sass +0 -2
  557. data/vendor/plugins/haml/test/sass/templates/bork4.sass +0 -2
  558. data/vendor/plugins/haml/test/sass/templates/compact.sass +0 -17
  559. data/vendor/plugins/haml/test/sass/templates/complex.sass +0 -305
  560. data/vendor/plugins/haml/test/sass/templates/compressed.sass +0 -15
  561. data/vendor/plugins/haml/test/sass/templates/expanded.sass +0 -17
  562. data/vendor/plugins/haml/test/sass/templates/import.sass +0 -12
  563. data/vendor/plugins/haml/test/sass/templates/import_charset.sass +0 -7
  564. data/vendor/plugins/haml/test/sass/templates/import_charset_1_8.sass +0 -4
  565. data/vendor/plugins/haml/test/sass/templates/import_charset_ibm866.sass +0 -9
  566. data/vendor/plugins/haml/test/sass/templates/importee.less +0 -2
  567. data/vendor/plugins/haml/test/sass/templates/importee.sass +0 -19
  568. data/vendor/plugins/haml/test/sass/templates/line_numbers.sass +0 -13
  569. data/vendor/plugins/haml/test/sass/templates/mixin_bork.sass +0 -5
  570. data/vendor/plugins/haml/test/sass/templates/mixins.sass +0 -76
  571. data/vendor/plugins/haml/test/sass/templates/multiline.sass +0 -20
  572. data/vendor/plugins/haml/test/sass/templates/nested.sass +0 -25
  573. data/vendor/plugins/haml/test/sass/templates/nested_bork1.sass +0 -2
  574. data/vendor/plugins/haml/test/sass/templates/nested_bork2.sass +0 -2
  575. data/vendor/plugins/haml/test/sass/templates/nested_bork3.sass +0 -2
  576. data/vendor/plugins/haml/test/sass/templates/nested_bork4.sass +0 -2
  577. data/vendor/plugins/haml/test/sass/templates/nested_mixin_bork.sass +0 -6
  578. data/vendor/plugins/haml/test/sass/templates/options.sass +0 -2
  579. data/vendor/plugins/haml/test/sass/templates/parent_ref.sass +0 -25
  580. data/vendor/plugins/haml/test/sass/templates/script.sass +0 -101
  581. data/vendor/plugins/haml/test/sass/templates/scss_import.scss +0 -11
  582. data/vendor/plugins/haml/test/sass/templates/scss_importee.scss +0 -1
  583. data/vendor/plugins/haml/test/sass/templates/subdir/nested_subdir/_nested_partial.sass +0 -2
  584. data/vendor/plugins/haml/test/sass/templates/subdir/nested_subdir/nested_subdir.sass +0 -3
  585. data/vendor/plugins/haml/test/sass/templates/subdir/subdir.sass +0 -6
  586. data/vendor/plugins/haml/test/sass/templates/units.sass +0 -11
  587. data/vendor/plugins/haml/test/sass/templates/warn.sass +0 -3
  588. data/vendor/plugins/haml/test/sass/templates/warn_imported.sass +0 -4
  589. data/vendor/plugins/haml/test/test_helper.rb +0 -98
  590. data/vendor/plugins/haml/vendor/fssm/LICENSE +0 -20
  591. data/vendor/plugins/haml/vendor/fssm/README.markdown +0 -55
  592. data/vendor/plugins/haml/vendor/fssm/Rakefile +0 -59
  593. data/vendor/plugins/haml/vendor/fssm/VERSION.yml +0 -5
  594. data/vendor/plugins/haml/vendor/fssm/example.rb +0 -9
  595. data/vendor/plugins/haml/vendor/fssm/fssm.gemspec +0 -77
  596. data/vendor/plugins/haml/vendor/fssm/lib/fssm.rb +0 -33
  597. data/vendor/plugins/haml/vendor/fssm/lib/fssm/backends/fsevents.rb +0 -36
  598. data/vendor/plugins/haml/vendor/fssm/lib/fssm/backends/inotify.rb +0 -26
  599. data/vendor/plugins/haml/vendor/fssm/lib/fssm/backends/polling.rb +0 -25
  600. data/vendor/plugins/haml/vendor/fssm/lib/fssm/backends/rubycocoa/fsevents.rb +0 -131
  601. data/vendor/plugins/haml/vendor/fssm/lib/fssm/monitor.rb +0 -26
  602. data/vendor/plugins/haml/vendor/fssm/lib/fssm/path.rb +0 -91
  603. data/vendor/plugins/haml/vendor/fssm/lib/fssm/pathname.rb +0 -502
  604. data/vendor/plugins/haml/vendor/fssm/lib/fssm/state/directory.rb +0 -57
  605. data/vendor/plugins/haml/vendor/fssm/lib/fssm/state/file.rb +0 -24
  606. data/vendor/plugins/haml/vendor/fssm/lib/fssm/support.rb +0 -63
  607. data/vendor/plugins/haml/vendor/fssm/lib/fssm/tree.rb +0 -176
  608. data/vendor/plugins/haml/vendor/fssm/profile/prof-cache.rb +0 -40
  609. data/vendor/plugins/haml/vendor/fssm/profile/prof-fssm-pathname.html +0 -1231
  610. data/vendor/plugins/haml/vendor/fssm/profile/prof-pathname.rb +0 -68
  611. data/vendor/plugins/haml/vendor/fssm/profile/prof-plain-pathname.html +0 -988
  612. data/vendor/plugins/haml/vendor/fssm/profile/prof.html +0 -2379
  613. data/vendor/plugins/haml/vendor/fssm/spec/path_spec.rb +0 -75
  614. data/vendor/plugins/haml/vendor/fssm/spec/root/duck/quack.txt +0 -0
  615. data/vendor/plugins/haml/vendor/fssm/spec/root/file.css +0 -0
  616. data/vendor/plugins/haml/vendor/fssm/spec/root/file.rb +0 -0
  617. data/vendor/plugins/haml/vendor/fssm/spec/root/file.yml +0 -0
  618. data/vendor/plugins/haml/vendor/fssm/spec/root/moo/cow.txt +0 -0
  619. data/vendor/plugins/haml/vendor/fssm/spec/spec_helper.rb +0 -14
  620. data/vendor/plugins/haml/yard/callbacks.rb +0 -29
  621. data/vendor/plugins/haml/yard/default/fulldoc/html/css/common.sass +0 -26
  622. data/vendor/plugins/haml/yard/default/layout/html/footer.erb +0 -12
  623. data/vendor/plugins/haml/yard/inherited_hash.rb +0 -41
@@ -1,1344 +0,0 @@
1
- # Haml (XHTML Abstraction Markup Language)
2
-
3
- * Table of contents
4
- {:toc}
5
-
6
- Haml is a markup language
7
- that's used to cleanly and simply describe the XHTML of any web document,
8
- without the use of inline code.
9
- Haml functions as a replacement
10
- for inline page templating systems such as PHP, ERB, and ASP.
11
- However, Haml avoids the need for explicitly coding XHTML into the template,
12
- because it is actually an abstract description of the XHTML,
13
- with some code to generate dynamic content.
14
-
15
- ## Features
16
-
17
- * Whitespace active
18
- * Well-formatted markup
19
- * DRY
20
- * Follows CSS conventions
21
- * Integrates Ruby code
22
- * Implements Rails templates with the .haml extension
23
-
24
- ## Using Haml
25
-
26
- Haml can be used in three ways:
27
- as a command-line tool,
28
- as a plugin for Ruby on Rails,
29
- and as a standalone Ruby module.
30
- The first step for all of these is to install the Haml gem:
31
-
32
- gem install haml
33
-
34
- To run Haml from the command line, just use
35
-
36
- haml input.haml output.html
37
-
38
- Use `haml --help` for full documentation.
39
-
40
- ### Rails/Merb Plugin {#plugin}
41
-
42
- To enable Haml in Rails versions before Rails 3,
43
- add the following line to `environment.rb`:
44
-
45
- config.gem "haml"
46
-
47
- For Rails 3, instead add the following line to the Gemfile:
48
-
49
- gem "haml"
50
-
51
- Once it's installed, all view files with the `".html.haml"` extension
52
- will be compiled using Haml.
53
- Haml is enabled by default in Merb.
54
-
55
- You can access instance variables in Haml templates
56
- the same way you do in ERB templates.
57
- Helper methods are also available in Haml templates.
58
- For example (this example uses Rails, but the principle for Merb is the same):
59
-
60
- # file: app/controllers/movies_controller.rb
61
-
62
- class MoviesController < ApplicationController
63
- def index
64
- @title = "Teen Wolf"
65
- end
66
- end
67
-
68
- -# file: app/views/movies/index.haml
69
-
70
- #content
71
- .title
72
- %h1= @title
73
- = link_to 'Home', home_url
74
-
75
- may be compiled to:
76
-
77
- <div id='content'>
78
- <div class='title'>
79
- <h1>Teen Wolf</h1>
80
- <a href='/'>Home</a>
81
- </div>
82
- </div>
83
-
84
- #### Rails XSS Protection
85
-
86
- Haml supports Rails' XSS protection scheme,
87
- which was introduced in Rails 2.3.5+ and is enabled by default in 3.0.0+.
88
- If it's enabled, Haml's [`:escape_html`](#escape_html-option)
89
- option is set to `true` by default -
90
- like in ERB, all strings printed to a Haml template are escaped by default.
91
- Also like ERB, strings marked as HTML safe are not escaped.
92
- Haml also has [its own syntax for printing a raw string to the template](#unescaping_html).
93
-
94
- If the `:escape_html` option is set to false when XSS protection is enabled,
95
- Haml doesn't escape Ruby strings by default.
96
- However, if a string marked HTML-safe is passed to [Haml's escaping syntax](#escaping_html),
97
- it won't be escaped.
98
-
99
- Finally, all the {file:Haml/Helpers.html Haml helpers} that return strings
100
- that are known to be HTML safe are marked as such.
101
- In addition, string input is escaped unless it's HTML safe.
102
-
103
- ### Ruby Module
104
-
105
- Haml can also be used completely separately from Rails and ActionView.
106
- To do this, install the gem with RubyGems:
107
-
108
- gem install haml
109
-
110
- You can then use it by including the "haml" gem in Ruby code,
111
- and using {Haml::Engine} like so:
112
-
113
- engine = Haml::Engine.new("%p Haml code!")
114
- engine.render #=> "<p>Haml code!</p>\n"
115
-
116
- ### Options
117
-
118
- Options can be set by setting the {Haml::Template#options Haml::Template.options} hash
119
- in `environment.rb` in Rails...
120
-
121
- Haml::Template.options[:format] = :html5
122
-
123
- ...or by setting the `Merb::Plugin.config[:haml]` hash in `init.rb` in Merb...
124
-
125
- Merb::Plugin.config[:haml][:format] = :html5
126
-
127
- ...or by passing an options hash to {Haml::Engine#initialize}.
128
- Available options are:
129
-
130
- {#format-option} `:format`
131
- : Determines the output format. Normally the default is `:xhtml`,
132
- although under Rails 3 it's `:html5`, since that's the Rails 3's default format.
133
- Other options are `:html4` and `:html5`, which are
134
- identical to `:xhtml` except there are no self-closing tags,
135
- the XML prolog is ignored and correct DOCTYPEs are generated.
136
-
137
- {#escape_html-option} `:escape_html`
138
- : Sets whether or not to escape HTML-sensitive characters in script.
139
- If this is true, `=` behaves like [`&=`](#escaping_html);
140
- otherwise, it behaves like [`!=`](#unescaping_html).
141
- Note that if this is set, `!=` should be used for yielding to subtemplates
142
- and rendering partials.
143
- See also [Escaping HTML](#escaping_html) and [Unescaping HTML](#unescaping_html)
144
- Defaults to false.
145
-
146
- {#ugly-option} `:ugly`
147
- : If set to `true`, Haml makes no attempt to properly
148
- indent or format the HTML output.
149
- This significantly improves rendering performance
150
- but makes viewing the source unpleasant.
151
- Defaults to `true` in Rails production mode, and `false`
152
- everywhere else.
153
-
154
- {#suppress_eval-option} `:suppress_eval`
155
- : Whether or not attribute hashes and Ruby scripts
156
- designated by `=` or `~` should be
157
- evaluated. If this is `true`, said scripts are
158
- rendered as empty strings. Defaults to `false`.
159
-
160
- {#attr_wrapper-option} `:attr_wrapper`
161
- : The character that should wrap element attributes.
162
- This defaults to `'` (an apostrophe). Characters
163
- of this type within the attributes will be escaped
164
- (e.g. by replacing them with `&apos;`) if
165
- the character is an apostrophe or a quotation mark.
166
-
167
- {#filename-option} `:filename`
168
- : The name of the Haml file being parsed.
169
- This is only used as information when exceptions are raised.
170
- This is automatically assigned when working through ActionView,
171
- so it's really only useful for the user to assign
172
- when dealing with Haml programatically.
173
-
174
- {#line-option} `:line`
175
- : The line offset of the Haml template being parsed.
176
- This is useful for inline templates,
177
- similar to the last argument to `Kernel#eval`.
178
-
179
- {#autoclose-option} `:autoclose`
180
- : A list of tag names that should be automatically self-closed
181
- if they have no content.
182
- This can also contain regular expressions that match tag names
183
- (or any object which responds to `#===`).
184
- Defaults to `['meta', 'img', 'link', 'br', 'hr', 'input', 'area', 'param', 'col', 'base']`.
185
-
186
- {#preserve-option} `:preserve`
187
- : A list of tag names that should automatically have their newlines preserved
188
- using the {Haml::Helpers#preserve} helper.
189
- This means that any content given on the same line as the tag will be preserved.
190
- For example, `%textarea= "Foo\nBar"` compiles to `<textarea>Foo&#x000A;Bar</textarea>`.
191
- Defaults to `['textarea', 'pre']`.
192
- See also [Whitespace Preservation](#whitespace_preservation).
193
-
194
- {#encoding-option} `:encoding`
195
- : The encoding to use for the HTML output.
196
- Only available in Ruby 1.9 or higher.
197
- This can be a string or an `Encoding` Object.
198
- Note that Haml **does not** automatically re-encode Ruby values;
199
- any strings coming from outside the application should be converted
200
- before being passed into the Haml template.
201
- Defaults to `Encoding.default_internal`; if that's not set,
202
- defaults to the encoding of the Haml template;
203
- if that's `us-ascii`, defaults to `"utf-8"`.
204
- <br/><br/> <!-- There's no better way to do a paragraph break in a dl in Maruku -->
205
- Many Ruby database drivers are not yet Ruby 1.9 compatible;
206
- in particular, they return strings marked as ASCII-encoded
207
- even when those strings contain non-ASCII characters (such as UTF-8).
208
- **This will cause encoding errors** if the Haml encoding isn't set to `"ascii-8bit"`.
209
- To solve this, either call `#force_encoding` on all the strings returned from the database,
210
- set `:encoding` to `"ascii-8bit"`, or try to get the authors of the database drivers
211
- to make them Ruby 1.9 compatible.
212
-
213
- ### Encodings
214
-
215
- When using Ruby 1.9 or later,
216
- Haml supports the same sorts of encoding-declaration comments that Ruby does.
217
- Although both Ruby and Haml support several different styles,
218
- the easiest it just to add `-# coding: encoding-name`
219
- at the beginning of the Haml template
220
- (it must come before all other lines).
221
- This will tell Haml that the template is encoded using the named encoding.
222
-
223
- By default, the HTML generated by Haml has the same encoding as the Haml template.
224
- However, if `Encoding.default_internal` is set, Haml will attempt to use that instead.
225
- In addition, the [`:encoding` option](#encoding-option) can be used
226
- to specify an output encoding manually.
227
-
228
- Note that, like Ruby, Haml does not support templates encoded in UTF-16 or UTF-32,
229
- since these encodings are not compatible with ASCII.
230
- It is possible to use these as the output encoding, though.
231
-
232
- ## Plain Text
233
-
234
- A substantial portion of any HTML document is its content,
235
- which is plain old text.
236
- Any Haml line that's not interpreted as something else
237
- is taken to be plain text, and passed through unmodified.
238
- For example:
239
-
240
- %gee
241
- %whiz
242
- Wow this is cool!
243
-
244
- is compiled to:
245
-
246
- <gee>
247
- <whiz>
248
- Wow this is cool!
249
- </whiz>
250
- </gee>
251
-
252
- Note that HTML tags are passed through unmodified as well.
253
- If you have some HTML you don't want to convert to Haml,
254
- or you're converting a file line-by-line,
255
- you can just include it as-is.
256
- For example:
257
-
258
- %p
259
- <div id="blah">Blah!</div>
260
-
261
- is compiled to:
262
-
263
- <p>
264
- <div id="blah">Blah!</div>
265
- </p>
266
-
267
- ### Escaping: `\`
268
-
269
- The backslash character escapes the first character of a line,
270
- allowing use of otherwise interpreted characters as plain text.
271
- For example:
272
-
273
- %title
274
- = @title
275
- \= @title
276
-
277
- is compiled to:
278
-
279
- <title>
280
- MyPage
281
- = @title
282
- </title>
283
-
284
- ## HTML Elements
285
-
286
-
287
- ### Element Name: `%`
288
-
289
- The percent character is placed at the beginning of a line.
290
- It's followed immediately by the name of an element,
291
- then optionally by modifiers (see below), a space,
292
- and text to be rendered inside the element.
293
- It creates an element in the form of `<element></element>`.
294
- For example:
295
-
296
- %one
297
- %two
298
- %three Hey there
299
-
300
- is compiled to:
301
-
302
- <one>
303
- <two>
304
- <three>Hey there</three>
305
- </two>
306
- </one>
307
-
308
- Any string is a valid element name;
309
- Haml will automatically generate opening and closing tags for any element.
310
-
311
- ### Attributes: `{}` or `()` {#attributes}
312
-
313
- Brackets represent a Ruby hash
314
- that is used for specifying the attributes of an element.
315
- It is literally evaluated as a Ruby hash,
316
- so logic will work in it and local variables may be used.
317
- Quote characters within the attribute
318
- will be replaced by appropriate escape sequences.
319
- The hash is placed after the tag is defined.
320
- For example:
321
-
322
- %html{:xmlns => "http://www.w3.org/1999/xhtml", "xml:lang" => "en", :lang => "en"}
323
-
324
- is compiled to:
325
-
326
- <html xmlns='http://www.w3.org/1999/xhtml' xml:lang='en' lang='en'></html>
327
-
328
- Attribute hashes can also be stretched out over multiple lines
329
- to accommodate many attributes.
330
- However, newlines may only be placed immediately after commas.
331
- For example:
332
-
333
- %script{:type => "text/javascript",
334
- :src => "javascripts/script_#{2 + 7}"}
335
-
336
- is compiled to:
337
-
338
- <script src='javascripts/script_9' type='text/javascript'></script>
339
-
340
- #### `:class` and `:id` Attributes
341
- {#class-and-id-attributes}
342
-
343
- The `:class` and `:id` attributes can also be specified as a Ruby array
344
- whose elements will be joined together.
345
- A `:class` array is joined with `" "`
346
- and an `:id` array is joined with `"_"`.
347
- For example:
348
-
349
- %div{:id => [@item.type, @item.number], :class => [@item.type, @item.urgency]}
350
-
351
- is equivalent to:
352
-
353
- %div{:id => "#{@item.type}_#{@item.number}", :class => "#{@item.type} #{@item.urgency}"}
354
-
355
- The array will first be flattened
356
- and any elements that do not test as true will be removed.
357
- The remaining elements will be converted to strings.
358
- For example:
359
-
360
- %div{:class => [@item.type, @item == @sortcol && [:sort, @sortdir]] } Contents
361
-
362
- could render as any of:
363
-
364
- <div class="numeric sort ascending">Contents</div>
365
- <div class="numeric">Contents</div>
366
- <div class="sort descending">Contents</div>
367
- <div>Contents</div>
368
-
369
- depending on whether `@item.type` is `"numeric"` or `nil`,
370
- whether `@item == @sortcol`,
371
- and whether `@sortdir` is `"ascending"` or `"descending"`.
372
-
373
- If a single value is specified and it evaluates to false it is ignored;
374
- otherwise it gets converted to a string.
375
- For example:
376
-
377
- .item{:class => @item.is_empty? && "empty"}
378
-
379
- could render as either of:
380
-
381
- class="item"
382
- class="item empty"
383
-
384
- #### HTML-style Attributes: `()`
385
-
386
- Haml also supports a terser, less Ruby-specific attribute syntax
387
- based on HTML's attributes.
388
- These are used with parentheses instead of brackets, like so:
389
-
390
- %html(xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en")
391
-
392
- Ruby variables can be used by omitting the quotes.
393
- Local variables or instance variables can be used.
394
- For example:
395
-
396
- %a(title=@title href=href) Stuff
397
-
398
- This is the same as:
399
-
400
- %a{:title => @title, :href => href} Stuff
401
-
402
- Because there are no commas separating attributes, though,
403
- more complicated expressions aren't allowed.
404
- For those you'll have to use the `{}` syntax.
405
- You can, however, use both syntaxes together:
406
-
407
- %a(title=@title){:href => @link.href} Stuff
408
-
409
- You can also use `#{}` interpolation to insert complicated expressions
410
- in a HTML-style attribute:
411
-
412
- %span(class="widget_#{@widget.number}")
413
-
414
- HTML-style attributes can be stretched across multiple lines
415
- just like hash-style attributes:
416
-
417
- %script(type="text/javascript"
418
- src="javascripts/script_#{2 + 7}")
419
-
420
- #### Attribute Methods
421
-
422
- A Ruby method call that returns a hash
423
- can be substituted for the hash contents.
424
- For example, {Haml::Helpers} defines the following method:
425
-
426
- def html_attrs(lang = 'en-US')
427
- {:xmlns => "http://www.w3.org/1999/xhtml", 'xml:lang' => lang, :lang => lang}
428
- end
429
-
430
- This can then be used in Haml, like so:
431
-
432
- %html{html_attrs('fr-fr')}
433
-
434
- This is compiled to:
435
-
436
- <html lang='fr-fr' xml:lang='fr-fr' xmlns='http://www.w3.org/1999/xhtml'>
437
- </html>
438
-
439
- You can use as many such attribute methods as you want
440
- by separating them with commas,
441
- like a Ruby argument list.
442
- All the hashes will me merged together, from left to right.
443
- For example, if you defined
444
-
445
- def hash1
446
- {:bread => 'white', :filling => 'peanut butter and jelly'}
447
- end
448
-
449
- def hash2
450
- {:bread => 'whole wheat'}
451
- end
452
-
453
- then
454
-
455
- %sandwich{hash1, hash2, :delicious => true}/
456
-
457
- would compile to:
458
-
459
- <sandwich bread='whole wheat' delicious='true' filling='peanut butter and jelly' />
460
-
461
- Note that the Haml attributes list has the same syntax as a Ruby method call.
462
- This means that any attribute methods must come before the hash literal.
463
-
464
- Attribute methods aren't supported for HTML-style attributes.
465
-
466
- #### Boolean Attributes
467
-
468
- Some attributes, such as "checked" for `input` tags or "selected" for `option` tags,
469
- are "boolean" in the sense that their values don't matter -
470
- it only matters whether or not they're present.
471
- In HTML (but not XHTML), these attributes can be written as
472
-
473
- <input selected>
474
-
475
- To do this in Haml using hash-style attributes, just assign a Ruby
476
- `true` value to the attribute:
477
-
478
- %input{:selected => true}
479
-
480
- In XHTML, the only valid value for these attributes is the name of the
481
- attribute. Thus this will render in XHTML as
482
-
483
- <input selected='selected'>
484
-
485
- To set these attributes to false, simply assign them to a Ruby false value.
486
- In both XHTML and HTML
487
-
488
- %input{:selected => false}
489
-
490
- will just render as
491
-
492
- <input>
493
-
494
- HTML-style boolean attributes can be written just like HTML:
495
-
496
- %input(selected)
497
-
498
- or using `true` and `false`:
499
-
500
- %input(selected=true)
501
-
502
- #### HTML5 Custom Data Attributes
503
-
504
- HTML5 allows for adding [custom non-visible data attributes](http://www.whatwg.org/specs/web-apps/current-work/multipage/elements.html#embedding-custom-non-visible-data)
505
- to elements using attribute names beginning with `data-`.
506
- Custom data attributes can be used in Haml by using the key `:data` with a Hash value
507
- in an attribute hash.
508
- Each of the key/value pairs in the Hash will be transformed into a custom data attribute.
509
- For example:
510
-
511
- %a{:href=>"/posts", :data => {:author_id => 123}} Posts By Author
512
-
513
- will render as:
514
-
515
- <a data-author_id='123' href='/posts'>Posts By Author</a>
516
-
517
- ### Class and ID: `.` and `#`
518
-
519
- The period and pound sign are borrowed from CSS.
520
- They are used as shortcuts to specify the `class`
521
- and `id` attributes of an element, respectively.
522
- Multiple class names can be specified in a similar way to CSS,
523
- by chaining the class names together with periods.
524
- They are placed immediately after the tag and before an attributes hash.
525
- For example:
526
-
527
- %div#things
528
- %span#rice Chicken Fried
529
- %p.beans{ :food => 'true' } The magical fruit
530
- %h1.class.otherclass#id La La La
531
-
532
- is compiled to:
533
-
534
- <div id='things'>
535
- <span id='rice'>Chicken Fried</span>
536
- <p class='beans' food='true'>The magical fruit</p>
537
- <h1 class='class otherclass' id='id'>La La La</h1>
538
- </div>
539
-
540
- And,
541
-
542
- %div#content
543
- %div.articles
544
- %div.article.title Doogie Howser Comes Out
545
- %div.article.date 2006-11-05
546
- %div.article.entry
547
- Neil Patrick Harris would like to dispel any rumors that he is straight
548
-
549
- is compiled to:
550
-
551
- <div id='content'>
552
- <div class='articles'>
553
- <div class='article title'>Doogie Howser Comes Out</div>
554
- <div class='article date'>2006-11-05</div>
555
- <div class='article entry'>
556
- Neil Patrick Harris would like to dispel any rumors that he is straight
557
- </div>
558
- </div>
559
- </div>
560
-
561
- These shortcuts can be combined with long-hand attributes;
562
- the two values will be merged together
563
- as though they were all placed in an array
564
- (see [the documentation on `:class` and `:id` attributes](#class-and-id-attributes)).
565
- For example:
566
-
567
- %div#Article.article.entry{:id => @article.number, :class => @article.visibility}
568
-
569
- is equivalent to
570
-
571
- %div{:id => ['Article', @article.number], :class => ['article', 'entry', @article.visibility]} Gabba Hey
572
-
573
- and could compile to:
574
-
575
- <div class="article entry visible" id="Article_27">Gabba Hey</div>
576
-
577
- #### Implicit Div Elements
578
-
579
- Because divs are used so often, they're the default elements.
580
- If you only define a class and/or id using `.` or `#`,
581
- a div is automatically used.
582
- For example:
583
-
584
- #collection
585
- .item
586
- .description What a cool item!
587
-
588
- is the same as:
589
-
590
- %div#collection
591
- %div.item
592
- %div.description What a cool item!
593
-
594
- and is compiled to:
595
-
596
- <div id='collection'>
597
- <div class='item'>
598
- <div class='description'>What a cool item!</div>
599
- </div>
600
- </div>
601
-
602
- ### Self-Closing Tags: `/`
603
-
604
- The forward slash character, when placed at the end of a tag definition,
605
- causes the tag to be self-closed.
606
- For example:
607
-
608
- %br/
609
- %meta{'http-equiv' => 'Content-Type', :content => 'text/html'}/
610
-
611
- is compiled to:
612
-
613
- <br />
614
- <meta http-equiv='Content-Type' content='text/html' />
615
-
616
- Some tags are automatically closed, as long as they have no content.
617
- `meta`, `img`, `link`, `script`, `br`, and `hr` tags are closed by default.
618
- This list can be customized by setting the [`:autoclose`](#autoclose-option) option.
619
- For example:
620
-
621
- %br
622
- %meta{'http-equiv' => 'Content-Type', :content => 'text/html'}
623
-
624
- is also compiled to:
625
-
626
- <br />
627
- <meta http-equiv='Content-Type' content='text/html' />
628
-
629
- ### Whitespace Removal: `>` and `<`
630
-
631
- `>` and `<` give you more control over the whitespace near a tag.
632
- `>` will remove all whitespace surrounding a tag,
633
- while `<` will remove all whitespace immediately within a tag.
634
- You can think of them as alligators eating the whitespace:
635
- `>` faces out of the tag and eats the whitespace on the outside,
636
- and `<` faces into the tag and eats the whitespace on the inside.
637
- They're placed at the end of a tag definition,
638
- after class, id, and attribute declarations
639
- but before `/` or `=`.
640
- For example:
641
-
642
- %blockquote<
643
- %div
644
- Foo!
645
-
646
- is compiled to:
647
-
648
- <blockquote><div>
649
- Foo!
650
- </div></blockquote>
651
-
652
- And:
653
-
654
- %img
655
- %img>
656
- %img
657
-
658
- is compiled to:
659
-
660
- <img /><img /><img />
661
-
662
- And:
663
-
664
- %p<= "Foo\nBar"
665
-
666
- is compiled to:
667
-
668
- <p>Foo
669
- Bar</p>
670
-
671
- And finally:
672
-
673
- %img
674
- %pre><
675
- foo
676
- bar
677
- %img
678
-
679
- is compiled to:
680
-
681
- <img /><pre>foo
682
- bar</pre><img />
683
-
684
- ### Object Reference: `[]`
685
-
686
- Square brackets follow a tag definition and contain a Ruby object
687
- that is used to set the class and id of that tag.
688
- The class is set to the object's class
689
- (transformed to use underlines rather than camel case)
690
- and the id is set to the object's class, followed by its id.
691
- Because the id of an object is normally an obscure implementation detail,
692
- this is most useful for elements that represent instances of Models.
693
- Additionally, the second argument (if present) will be used as a prefix for
694
- both the id and class attributes.
695
- For example:
696
-
697
- # file: app/controllers/users_controller.rb
698
-
699
- def show
700
- @user = CrazyUser.find(15)
701
- end
702
-
703
- -# file: app/views/users/show.haml
704
-
705
- %div[@user, :greeting]
706
- %bar[290]/
707
- Hello!
708
-
709
- is compiled to:
710
-
711
- <div class='greeting_crazy_user' id='greeting_crazy_user_15'>
712
- <bar class='fixnum' id='fixnum_581' />
713
- Hello!
714
- </div>
715
-
716
- If you require that the class be something other than the underscored
717
- object's class, you can implement the `haml_object_ref` method on the object.
718
-
719
- # file: app/models/crazy_user.rb
720
-
721
- class CrazyUser < ActiveRecord::Base
722
- def haml_object_ref
723
- "a_crazy_user"
724
- end
725
- end
726
-
727
- -# file: app/views/users/show.haml
728
-
729
- %div[@user]
730
- Hello!
731
-
732
- is compiled to:
733
-
734
- <div class='a_crazy_user' id='a_crazy_user_15'>
735
- Hello!
736
- </div>
737
-
738
-
739
- ## Doctype: `!!!`
740
-
741
- When describing HTML documents with Haml,
742
- you can have a document type or XML prolog generated automatically
743
- by including the characters `!!!`.
744
- For example:
745
-
746
- !!! XML
747
- !!!
748
- %html
749
- %head
750
- %title Myspace
751
- %body
752
- %h1 I am the international space station
753
- %p Sign my guestbook
754
-
755
- is compiled to:
756
-
757
- <?xml version='1.0' encoding='utf-8' ?>
758
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
759
- <html>
760
- <head>
761
- <title>Myspace</title>
762
- </head>
763
- <body>
764
- <h1>I am the international space station</h1>
765
- <p>Sign my guestbook</p>
766
- </body>
767
- </html>
768
-
769
- You can also specify the specific doctype after the `!!!`
770
- When the [`:format`](#format-option) is set to `:xhtml` (the default except in Rails 3),
771
- the following doctypes are supported:
772
-
773
- `!!!`
774
- : XHTML 1.0 Transitional<br/>
775
- `<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">`
776
-
777
- `!!! Strict`
778
- : XHTML 1.0 Strict<br/>
779
- `<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">`
780
-
781
- `!!! Frameset`
782
- : XHTML 1.0 Frameset<br/>
783
- `<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">`
784
-
785
- `!!! 5`
786
- : XHTML 5<br/>
787
- `<!DOCTYPE html>`<br/>
788
-
789
- `!!! 1.1`
790
- : XHTML 1.1<br/>
791
- `<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">`
792
-
793
- `!!! Basic`
794
- : XHTML Basic 1.1<br/>
795
- `<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML Basic 1.1//EN" "http://www.w3.org/TR/xhtml-basic/xhtml-basic11.dtd"> `
796
-
797
- `!!! Mobile`
798
- : XHTML Mobile 1.2<br/>
799
- `<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.2//EN" "http://www.openmobilealliance.org/tech/DTD/xhtml-mobile12.dtd">`
800
-
801
- `!!! RDFa`
802
- : XHTML+RDFa 1.0<br/>
803
- `<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.0//EN" "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd">`
804
-
805
- When the [`:format`](#format-option) option is set to `:html4`,
806
- the following doctypes are supported:
807
-
808
- `!!!`
809
- : HTML 4.01 Transitional<br/>
810
- `<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">`
811
-
812
- `!!! Strict`
813
- : HTML 4.01 Strict<br/>
814
- `<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">`
815
-
816
- `!!! Frameset`
817
- : HTML 4.01 Frameset<br/>
818
- `<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">`
819
-
820
- When the [`:format`](#format-option) option is set to `:html5`,
821
- `!!!` is always `<!DOCTYPE html>`.
822
-
823
- If you're not using the UTF-8 character set for your document,
824
- you can specify which encoding should appear
825
- in the XML prolog in a similar way.
826
- For example:
827
-
828
- !!! XML iso-8859-1
829
-
830
- is compiled to:
831
-
832
- <?xml version='1.0' encoding='iso-8859-1' ?>
833
-
834
- ## Comments
835
-
836
- Haml supports two sorts of comments:
837
- those that show up in the HTML output
838
- and those that don't.
839
-
840
- ### HTML Comments: `/`
841
-
842
- The forward slash character, when placed at the beginning of a line,
843
- wraps all text after it in an HTML comment.
844
- For example:
845
-
846
- %peanutbutterjelly
847
- / This is the peanutbutterjelly element
848
- I like sandwiches!
849
-
850
- is compiled to:
851
-
852
- <peanutbutterjelly>
853
- <!-- This is the peanutbutterjelly element -->
854
- I like sandwiches!
855
- </peanutbutterjelly>
856
-
857
- The forward slash can also wrap indented sections of code. For example:
858
-
859
- /
860
- %p This doesn't render...
861
- %div
862
- %h1 Because it's commented out!
863
-
864
- is compiled to:
865
-
866
- <!--
867
- <p>This doesn't render...</p>
868
- <div>
869
- <h1>Because it's commented out!</h1>
870
- </div>
871
- -->
872
-
873
- #### Conditional Comments: `/[]`
874
-
875
- You can also use [Internet Explorer conditional comments](http://www.quirksmode.org/css/condcom.html)
876
- by enclosing the condition in square brackets after the `/`.
877
- For example:
878
-
879
- /[if IE]
880
- %a{ :href => 'http://www.mozilla.com/en-US/firefox/' }
881
- %h1 Get Firefox
882
-
883
- is compiled to:
884
-
885
- <!--[if IE]>
886
- <a href='http://www.mozilla.com/en-US/firefox/'>
887
- <h1>Get Firefox</h1>
888
- </a>
889
- <![endif]-->
890
-
891
- ### Haml Comments: `-#`
892
-
893
- The hyphen followed immediately by the pound sign
894
- signifies a silent comment.
895
- Any text following this isn't rendered in the resulting document
896
- at all.
897
-
898
- For example:
899
-
900
- %p foo
901
- -# This is a comment
902
- %p bar
903
-
904
- is compiled to:
905
-
906
- <p>foo</p>
907
- <p>bar</p>
908
-
909
- You can also nest text beneath a silent comment.
910
- None of this text will be rendered.
911
- For example:
912
-
913
- %p foo
914
- -#
915
- This won't be displayed
916
- Nor will this
917
- %p bar
918
-
919
- is compiled to:
920
-
921
- <p>foo</p>
922
- <p>bar</p>
923
-
924
- ## Ruby Evaluation
925
-
926
- ### Inserting Ruby: `=`
927
-
928
- The equals character is followed by Ruby code.
929
- This code is evaluated and the output is inserted into the document.
930
- For example:
931
-
932
- %p
933
- = ['hi', 'there', 'reader!'].join " "
934
- = "yo"
935
-
936
- is compiled to:
937
-
938
- <p>
939
- hi there reader!
940
- yo
941
- </p>
942
-
943
- If the [`:escape_html`](#escape_html-option) option is set, `=` will sanitize any
944
- HTML-sensitive characters generated by the script. For example:
945
-
946
- = '<script>alert("I\'m evil!");</script>'
947
-
948
- would be compiled to
949
-
950
- &lt;script&gt;alert(&quot;I'm evil!&quot;);&lt;/script&gt;
951
-
952
- `=` can also be used at the end of a tag to insert Ruby code within that tag.
953
- For example:
954
-
955
- %p= "hello"
956
-
957
- would be compiled to
958
-
959
- <p>hello</p>
960
-
961
- A line of Ruby code can be stretched over multiple lines
962
- as long as each line but the last ends with a comma.
963
- For example:
964
-
965
- = link_to_remote "Add to cart",
966
- :url => { :action => "add", :id => product.id },
967
- :update => { :success => "cart", :failure => "error" }
968
-
969
- Note that it's illegal to nest code within a tag that ends with `=`.
970
-
971
- ### Running Ruby: `-`
972
-
973
- The hyphen character is also followed by Ruby code.
974
- This code is evaluated but *not* inserted into the document.
975
-
976
- **It is not recommended that you use this widely;
977
- almost all processing code and logic should be restricted
978
- to the Controller, the Helper, or partials.**
979
-
980
- For example:
981
-
982
- - foo = "hello"
983
- - foo << " there"
984
- - foo << " you!"
985
- %p= foo
986
-
987
- is compiled to:
988
-
989
- <p>
990
- hello there you!
991
- </p>
992
-
993
- A line of Ruby code can be stretched over multiple lines
994
- as long as each line but the last ends with a comma.
995
- For example:
996
-
997
- - links = {:home => "/",
998
- :docs => "/docs",
999
- :about => "/about"}
1000
-
1001
- #### Ruby Blocks
1002
-
1003
- Ruby blocks, like XHTML tags, don't need to be explicitly closed in Haml.
1004
- Rather, they're automatically closed, based on indentation.
1005
- A block begins whenever the indentation is increased
1006
- after a Ruby evaluation command.
1007
- It ends when the indentation decreases
1008
- (as long as it's not an `else` clause or something similar).
1009
- For example:
1010
-
1011
- - (42...47).each do |i|
1012
- %p= i
1013
- %p See, I can count!
1014
-
1015
- is compiled to:
1016
-
1017
- <p>42</p>
1018
- <p>43</p>
1019
- <p>44</p>
1020
- <p>45</p>
1021
- <p>46</p>
1022
- <p>See, I can count!</p>
1023
-
1024
- Another example:
1025
-
1026
- %p
1027
- - case 2
1028
- - when 1
1029
- = "1!"
1030
- - when 2
1031
- = "2?"
1032
- - when 3
1033
- = "3."
1034
-
1035
- is compiled to:
1036
-
1037
- <p>
1038
- 2?
1039
- </p>
1040
-
1041
- ### Whitespace Preservation: `~` {#tilde}
1042
-
1043
- `~` works just like `=`, except that it runs {Haml::Helpers#find\_and\_preserve} on its input.
1044
- For example,
1045
-
1046
- ~ "Foo\n<pre>Bar\nBaz</pre>"
1047
-
1048
- is the same as:
1049
-
1050
- = find_and_preserve("Foo\n<pre>Bar\nBaz</pre>")
1051
-
1052
- and is compiled to:
1053
-
1054
- Foo
1055
- <pre>Bar&#x000A;Baz</pre>
1056
-
1057
- See also [Whitespace Preservation](#whitespace_preservation).
1058
-
1059
- ### Ruby Interpolation: `#{}`
1060
-
1061
- Ruby code can also be interpolated within plain text using `#{}`,
1062
- similarly to Ruby string interpolation.
1063
- For example,
1064
-
1065
- %p This is #{h quality} cake!
1066
-
1067
- is the same as
1068
-
1069
- %p= "This is the #{h quality} cake!"
1070
-
1071
- and might compile to
1072
-
1073
- <p>This is scrumptious cake!</p>
1074
-
1075
- Backslashes can be used to escape `#{` strings,
1076
- but they don't act as escapes anywhere else in the string.
1077
- For example:
1078
-
1079
- %p
1080
- Look at \\#{h word} lack of backslash: \#{foo}
1081
- And yon presence thereof: \{foo}
1082
-
1083
- might compile to
1084
-
1085
- <p>
1086
- Look at \yon lack of backslash: #{foo}
1087
- And yon presence thereof: \{foo}
1088
- </p>
1089
-
1090
- Interpolation can also be used within [filters](#filters).
1091
- For example:
1092
-
1093
- :javascript
1094
- $(document).ready(function() {
1095
- alert(#{@message.to_json});
1096
- });
1097
-
1098
- might compile to
1099
-
1100
- <script type='text/javascript'>
1101
- //<![CDATA[
1102
- $(document).ready(function() {
1103
- alert("Hi there!");
1104
- });
1105
- //]]>
1106
- </script>
1107
-
1108
- ### Escaping HTML: `&=` {#escaping_html}
1109
-
1110
- An ampersand followed by one or two equals characters
1111
- evaluates Ruby code just like the equals without the ampersand,
1112
- but sanitizes any HTML-sensitive characters in the result of the code.
1113
- For example:
1114
-
1115
- &= "I like cheese & crackers"
1116
-
1117
- compiles to
1118
-
1119
- I like cheese &amp; crackers
1120
-
1121
- If the [`:escape_html`](#escape_html-option) option is set,
1122
- `&=` behaves identically to `=`.
1123
-
1124
- `&` can also be used on its own so that `#{}` interpolation is escaped.
1125
- For example,
1126
-
1127
- & I like #{"cheese & crackers"}
1128
-
1129
- compiles to
1130
-
1131
- I like cheese &amp; crackers
1132
-
1133
- ### Unescaping HTML: `!=` {#unescaping_html}
1134
-
1135
- An exclamation mark followed by one or two equals characters
1136
- evaluates Ruby code just like the equals would,
1137
- but never sanitizes the HTML.
1138
-
1139
- By default, the single equals doesn't sanitize HTML either.
1140
- However, if the [`:escape_html`](#escape_html-option) option is set,
1141
- `=` will sanitize the HTML, but `!=` still won't.
1142
- For example, if `:escape_html` is set:
1143
-
1144
- = "I feel <strong>!"
1145
- != "I feel <strong>!"
1146
-
1147
- compiles to
1148
-
1149
- I feel &lt;strong&gt;!
1150
- I feel <strong>!
1151
-
1152
- `!` can also be used on its own so that `#{}` interpolation is unescaped.
1153
- For example,
1154
-
1155
- ! I feel #{"<strong>"}!
1156
-
1157
- compiles to
1158
-
1159
- I feel <strong>!
1160
-
1161
- ## Filters {#filters}
1162
-
1163
- The colon character designates a filter.
1164
- This allows you to pass an indented block of text as input
1165
- to another filtering program and add the result to the output of Haml.
1166
- The syntax is simply a colon followed by the name of the filter.
1167
- For example,
1168
-
1169
- %p
1170
- :markdown
1171
- Textile
1172
- =======
1173
-
1174
- Hello, *World*
1175
-
1176
- is compiled to
1177
-
1178
- <p>
1179
- <h1>Textile</h1>
1180
-
1181
- <p>Hello, <em>World</em></p>
1182
- </p>
1183
-
1184
- Filters can have Ruby code interpolated with `#{}`.
1185
- For example,
1186
-
1187
- - flavor = "raspberry"
1188
- #content
1189
- :textile
1190
- I *really* prefer _#{h flavor}_ jam.
1191
-
1192
- is compiled to
1193
-
1194
- <div id='content'>
1195
- <p>I <strong>really</strong> prefer <em>raspberry</em> jam.</p>
1196
- </div>
1197
-
1198
- Currently, filters ignore the [`:escape_html`](#escape_html-option) option.
1199
- This means that `#{}` interpolation within filters is never HTML-escaped.
1200
-
1201
- Haml has the following filters defined:
1202
-
1203
- {#plain-filter}
1204
- ### `:plain`
1205
- Does not parse the filtered text.
1206
- This is useful for large blocks of text without HTML tags,
1207
- when you don't want lines starting with `.` or `-` to be parsed.
1208
-
1209
- {#javascript-filter}
1210
- ### `:javascript`
1211
- Surrounds the filtered text with `<script>` and CDATA tags.
1212
- Useful for including inline Javascript.
1213
-
1214
- {#css-filter}
1215
- ### `:css`
1216
- Surrounds the filtered text with `<style>` and CDATA tags.
1217
- Useful for including inline CSS.
1218
-
1219
- {#cdata-filter}
1220
- ### `:cdata`
1221
- Surrounds the filtered text with CDATA tags.
1222
-
1223
- {#escaped-filter}
1224
- ### `:escaped`
1225
- Works the same as plain, but HTML-escapes the text
1226
- before placing it in the document.
1227
-
1228
- {#ruby-filter}
1229
- ### `:ruby`
1230
- Parses the filtered text with the normal Ruby interpreter.
1231
- All output sent to `$stdout`, like with `puts`,
1232
- is output into the Haml document.
1233
- Not available if the [`:suppress_eval`](#suppress_eval-option) option is set to true.
1234
- The Ruby code is evaluated in the same context as the Haml template.
1235
-
1236
- {#preserve-filter}
1237
- ### `:preserve`
1238
- Inserts the filtered text into the template with whitespace preserved.
1239
- `preserve`d blocks of text aren't indented,
1240
- and newlines are replaced with the HTML escape code for newlines,
1241
- to preserve nice-looking output.
1242
- See also [Whitespace Preservation](#whitespace_preservation).
1243
-
1244
- {#erb-filter}
1245
- ### `:erb`
1246
- Parses the filtered text with ERb, like an RHTML template.
1247
- Not available if the [`:suppress_eval`](#suppress_eval-option) option is set to true.
1248
- Embedded Ruby code is evaluated in the same context as the Haml template.
1249
-
1250
- {#sass-filter}
1251
- ### `:sass`
1252
- Parses the filtered text with Sass to produce CSS output.
1253
-
1254
- {#textile-filter}
1255
- ### `:textile`
1256
- Parses the filtered text with [Textile](http://www.textism.com/tools/textile).
1257
- Only works if [RedCloth](http://redcloth.org) is installed.
1258
-
1259
- {#markdown-filter}
1260
- ### `:markdown`
1261
- Parses the filtered text with [Markdown](http://daringfireball.net/projects/markdown).
1262
- Only works if [RDiscount](http://github.com/rtomayko/rdiscount),
1263
- [RPeg-Markdown](http://github.com/rtomayko/rpeg-markdown),
1264
- [Maruku](http://maruku.rubyforge.org),
1265
- or [BlueCloth](www.deveiate.org/projects/BlueCloth) are installed.
1266
-
1267
- {#maruku-filter}
1268
- ### `:maruku`
1269
- Parses the filtered text with [Maruku](http://maruku.rubyforge.org),
1270
- which has some non-standard extensions to Markdown.
1271
-
1272
- ### Custom Filters
1273
-
1274
- You can also define your own filters. See {Haml::Filters} for details.
1275
-
1276
- ## Multiline: `|` {#multiline}
1277
-
1278
- The pipe character designates a multiline string.
1279
- It's placed at the end of a line (after some whitespace)
1280
- and means that all following lines that end with `|`
1281
- will be evaluated as though they were on the same line.
1282
- **Note that even the last line in the multiline block
1283
- should end with `|`.**
1284
- For example:
1285
-
1286
- %whoo
1287
- %hoo= h( |
1288
- "I think this might get " + |
1289
- "pretty long so I should " + |
1290
- "probably make it " + |
1291
- "multiline so it doesn't " + |
1292
- "look awful.") |
1293
- %p This is short.
1294
-
1295
- is compiled to:
1296
-
1297
- <whoo>
1298
- <hoo>I think this might get pretty long so I should probably make it multiline so it doesn't look awful.</hoo>
1299
- <p>This is short</p>
1300
- </whoo>
1301
-
1302
- Using multiline declarations in Haml is intentionally awkward.
1303
- This is designed to discourage people from putting lots and lots of Ruby code
1304
- in their Haml templates.
1305
- If you find yourself using multiline declarations, stop and think:
1306
- could I do this better with a helper?
1307
-
1308
- Note that there are a few cases where it's useful to allow
1309
- something to flow over onto multiple lines in a non-awkward manner.
1310
- One of these is HTML attributes.
1311
- Some elements just have lots of attributes,
1312
- so you can wrap attributes without using `|` (see [Attributes](#attributes)).
1313
-
1314
- In addition, sometimes you need to call Ruby methods or declare data structures
1315
- that just need a lot of template information.
1316
- So data structures and functions that require lots of arguments
1317
- can be wrapped over multiple lines,
1318
- as long as each line but the last ends in a comma
1319
- (see [Inserting Ruby](#inserting_ruby_)).
1320
-
1321
- ## Whitespace Preservation
1322
-
1323
- Sometimes you don't want Haml to indent all your text.
1324
- For example, tags like `pre` and `textarea` are whitespace-sensitive;
1325
- indenting the text makes them render wrong.
1326
-
1327
- Haml deals with this by "preserving" newlines before they're put into the document --
1328
- converting them to the XHTML whitespace escape code, `&#x000A;`.
1329
- Then Haml won't try to re-format the indentation.
1330
-
1331
- Literal `textarea` and `pre` tags automatically preserve content given through `=`.
1332
- Dynamically-generated `textarea`s and `pre`s can't be preserved automatically,
1333
- and so should be passed through {Haml::Helpers#find\_and\_preserve} or the [`~` command](#tilde),
1334
- which has the same effect.
1335
-
1336
- Blocks of literal text can be preserved using the [`:preserve` filter](#preserve-filter).
1337
-
1338
- ## Helpers
1339
-
1340
- Haml offers a bunch of helpers that are useful
1341
- for doing stuff like preserving whitespace,
1342
- creating nicely indented output for user-defined helpers,
1343
- and other useful things.
1344
- The helpers are all documented in the {Haml::Helpers} and {Haml::Helpers::ActionViewExtensions} modules.