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.
- data/app/controllers/admin/resource_controller.rb +1 -0
- data/app/controllers/application_controller.rb +1 -1
- data/app/models/deprecated_tags.rb +5 -48
- data/app/models/user_action_observer.rb +8 -2
- data/app/views/layouts/application.html.haml +1 -1
- data/config/boot.rb +2 -2
- data/config/environment.rb +5 -3
- data/config/initializers/compass.rb +5 -0
- data/config/locales/en.yml +2 -2
- data/features/step_definitions/admin/pages_management_steps.rb +6 -1
- data/features/support/paths.rb +13 -0
- data/lib/generators/extension/templates/cucumber_env.rb +5 -1
- data/lib/generators/extension/templates/cucumber_paths.rb +20 -12
- data/lib/generators/extension/templates/gemspec.rb +10 -5
- data/lib/generators/instance/templates/instance_environment.rb +4 -2
- data/lib/radiant.rb +1 -1
- data/lib/radiant/gem_dependency_fix.rb +1 -1
- data/lib/radiant/taggable.rb +42 -3
- data/lib/tasks/framework.rake +6 -6
- data/{vendor/plugins/haml/test/sass/results/warn.css → log/.keep} +0 -0
- data/radiant.gemspec +3 -2
- data/script/console +2 -2
- data/spec/controllers/admin/pages_controller_spec.rb +1 -1
- data/spec/lib/radiant/taggable_spec.rb +53 -0
- data/vendor/extensions/archive/Rakefile +3 -3
- data/vendor/extensions/archive/features/support/env.rb +5 -1
- data/vendor/extensions/archive/features/support/paths.rb +20 -12
- data/vendor/extensions/archive/radiant-archive-extension.gemspec +10 -5
- data/vendor/extensions/archive/tmp/cache/meta/0e/da69d02186242cdfda62e46044566f2bc50f3a +0 -0
- data/vendor/extensions/{assets → clipped}/LICENSE +0 -0
- data/vendor/extensions/{assets → clipped}/README.md +21 -21
- data/vendor/extensions/{assets → clipped}/Rakefile +29 -31
- data/vendor/extensions/{assets → clipped}/app/controllers/admin/assets_controller.rb +16 -11
- data/vendor/extensions/clipped/app/controllers/admin/page_attachments_controller.rb +18 -0
- data/vendor/extensions/clipped/app/helpers/admin/assets_helper.rb +16 -0
- data/vendor/extensions/{assets → clipped}/app/models/asset.rb +12 -9
- data/vendor/extensions/{assets → clipped}/app/models/asset_tags.rb +36 -53
- data/vendor/extensions/{assets → clipped}/app/models/asset_type.rb +1 -7
- data/vendor/extensions/{assets → clipped}/app/models/old_page_attachment.rb +0 -0
- data/vendor/extensions/clipped/app/models/page_attachment.rb +21 -0
- data/vendor/extensions/{assets → clipped}/app/views/admin/assets/_asset.html.haml +2 -2
- data/vendor/extensions/{assets → clipped}/app/views/admin/assets/_asset_table.html.haml +4 -4
- data/vendor/extensions/clipped/app/views/admin/assets/_errors.html.haml +3 -0
- data/vendor/extensions/{assets → clipped}/app/views/admin/assets/_form.html.haml +2 -2
- data/vendor/extensions/{assets → clipped}/app/views/admin/assets/_page_assets.html.haml +1 -1
- data/vendor/extensions/{assets → clipped}/app/views/admin/assets/_search.html.haml +0 -0
- data/vendor/extensions/{assets → clipped}/app/views/admin/assets/_search_results.html.haml +1 -1
- data/vendor/extensions/{assets → clipped}/app/views/admin/assets/edit.html.haml +7 -8
- data/vendor/extensions/{assets → clipped}/app/views/admin/assets/index.html.haml +3 -2
- data/vendor/extensions/{assets → clipped}/app/views/admin/assets/new.html.haml +2 -2
- data/vendor/extensions/clipped/app/views/admin/assets/refresh.html.haml +14 -0
- data/vendor/extensions/{assets → clipped}/app/views/admin/assets/remove.html.haml +3 -3
- data/vendor/extensions/{assets → clipped}/app/views/admin/configuration/_edit.html.haml +1 -1
- data/vendor/extensions/{assets → clipped}/app/views/admin/configuration/_show.html.haml +1 -1
- data/vendor/extensions/clipped/app/views/admin/page_attachments/_attachment.html.haml +25 -0
- data/vendor/extensions/{assets → clipped}/app/views/admin/page_parts/_page_part.html.haml +3 -2
- data/vendor/extensions/{assets → clipped}/app/views/admin/pages/_asset_popups.html.haml +7 -7
- data/vendor/extensions/clipped/app/views/admin/pages/_assets.html.haml +11 -0
- data/vendor/extensions/{assets → clipped}/app/views/admin/removed/_assets_bucket.html.haml +1 -1
- data/vendor/extensions/{assets → clipped}/app/views/admin/removed/_assets_container.html.haml +9 -9
- data/vendor/extensions/{assets → clipped}/app/views/admin/removed/_bucket.html.haml +1 -1
- data/vendor/extensions/{assets → clipped}/app/views/admin/removed/_bucket_asset.html.haml +2 -2
- data/vendor/extensions/clipped/app/views/admin/removed/_show_bucket_link.html.haml +4 -0
- data/vendor/extensions/{assets → clipped}/app/views/admin/removed/_upload_to_page.html.haml +2 -2
- data/vendor/extensions/{assets → clipped}/app/views/admin/removed/bucket/_iframe.html.haml +0 -0
- data/vendor/extensions/{assets → clipped}/artwork/icons.png +0 -0
- data/vendor/extensions/{assets/assets_extension.rb → clipped/clipped_extension.rb} +10 -10
- data/vendor/extensions/{assets → clipped}/config/initializers/interpolation.rb +0 -0
- data/vendor/extensions/clipped/config/initializers/processors.rb +12 -0
- data/vendor/extensions/{assets → clipped}/config/initializers/radiant_config.rb +5 -4
- data/vendor/extensions/{assets → clipped}/config/locales/en.yml +6 -3
- data/vendor/extensions/{assets → clipped}/config/locales/nl.yml +1 -1
- data/vendor/extensions/{assets → clipped}/config/routes.rb +2 -2
- data/vendor/extensions/clipped/cucumber.yml +1 -0
- data/vendor/extensions/{assets → clipped}/db/migrate/001_create_assets.rb +0 -0
- data/vendor/extensions/{assets → clipped}/db/migrate/002_create_paperclip_attributes.rb +0 -0
- data/vendor/extensions/{assets → clipped}/db/migrate/003_create_user_observer.rb +0 -0
- data/vendor/extensions/{assets → clipped}/db/migrate/004_create_page_attachments.rb +0 -0
- data/vendor/extensions/{assets → clipped}/db/migrate/005_rename_users.rb +0 -0
- data/vendor/extensions/{assets → clipped}/db/migrate/20090316132151_disable_file_types.rb +0 -0
- data/vendor/extensions/{assets → clipped}/db/migrate/20110513205050_asset_uuid.rb +0 -0
- data/vendor/extensions/clipped/features/support/env.rb +11 -0
- data/vendor/extensions/clipped/features/support/paths.rb +22 -0
- data/vendor/extensions/{assets/lib/assets_admin_ui.rb → clipped/lib/clipped_admin_ui.rb} +1 -1
- data/vendor/extensions/{assets → clipped}/lib/page_asset_associations.rb +1 -1
- data/vendor/extensions/{assets → clipped}/lib/paperclip/frame_grab.rb +0 -0
- data/vendor/extensions/clipped/lib/radiant-clipped-extension.rb +2 -0
- data/vendor/extensions/clipped/lib/radiant-clipped-extension/version.rb +3 -0
- data/vendor/extensions/{assets/lib/tasks/assets_extension_tasks.rake → clipped/lib/tasks/clipped_extension_tasks.rake} +22 -16
- data/vendor/extensions/{assets → clipped}/lib/tasks/paperclip_tasks.rake +0 -0
- data/{public → vendor/extensions/clipped/public}/flash/ZeroClipboard.swf +0 -0
- data/{public → vendor/extensions/clipped/public}/images/admin/assets/add.png +0 -0
- data/{public → vendor/extensions/clipped/public}/images/admin/assets/archive_icon.png +0 -0
- data/{public → vendor/extensions/clipped/public}/images/admin/assets/audio_icon.png +0 -0
- data/{public → vendor/extensions/clipped/public}/images/admin/assets/audio_thumbnail.png +0 -0
- data/{public → vendor/extensions/clipped/public}/images/admin/assets/c_icon.png +0 -0
- data/{public → vendor/extensions/clipped/public}/images/admin/assets/copy.png +0 -0
- data/{public → vendor/extensions/clipped/public}/images/admin/assets/css_icon.png +0 -0
- data/{public → vendor/extensions/clipped/public}/images/admin/assets/database_icon.png +0 -0
- data/{public → vendor/extensions/clipped/public}/images/admin/assets/delete.png +0 -0
- data/{public → vendor/extensions/clipped/public}/images/admin/assets/document_icon.png +0 -0
- data/{public → vendor/extensions/clipped/public}/images/admin/assets/document_thumbnail.png +0 -0
- data/{public → vendor/extensions/clipped/public}/images/admin/assets/flash_icon.png +0 -0
- data/{public → vendor/extensions/clipped/public}/images/admin/assets/flash_thumbnail.png +0 -0
- data/{public → vendor/extensions/clipped/public}/images/admin/assets/font_icon.png +0 -0
- data/{public → vendor/extensions/clipped/public}/images/admin/assets/gzip_icon.png +0 -0
- data/{public → vendor/extensions/clipped/public}/images/admin/assets/html_icon.png +0 -0
- data/{public → vendor/extensions/clipped/public}/images/admin/assets/image_icon.png +0 -0
- data/{public → vendor/extensions/clipped/public}/images/admin/assets/image_thumbnail.png +0 -0
- data/{public → vendor/extensions/clipped/public}/images/admin/assets/java_icon.png +0 -0
- data/{public → vendor/extensions/clipped/public}/images/admin/assets/page_edit.png +0 -0
- data/{public → vendor/extensions/clipped/public}/images/admin/assets/perl_icon.png +0 -0
- data/{public → vendor/extensions/clipped/public}/images/admin/assets/php_icon.png +0 -0
- data/{public → vendor/extensions/clipped/public}/images/admin/assets/presentation_icon.png +0 -0
- data/{public → vendor/extensions/clipped/public}/images/admin/assets/python_icon.png +0 -0
- data/{public → vendor/extensions/clipped/public}/images/admin/assets/reorder_assets.png +0 -0
- data/{public → vendor/extensions/clipped/public}/images/admin/assets/ruby_icon.png +0 -0
- data/{public → vendor/extensions/clipped/public}/images/admin/assets/script_icon.png +0 -0
- data/{public → vendor/extensions/clipped/public}/images/admin/assets/spreadsheet_icon.png +0 -0
- data/{public → vendor/extensions/clipped/public}/images/admin/assets/tar_icon.png +0 -0
- data/{public → vendor/extensions/clipped/public}/images/admin/assets/unknown_icon.png +0 -0
- data/{public → vendor/extensions/clipped/public}/images/admin/assets/unknown_thumbnail.png +0 -0
- data/{public → vendor/extensions/clipped/public}/images/admin/assets/video_icon.png +0 -0
- data/{public → vendor/extensions/clipped/public}/images/admin/assets/video_thumbnail.png +0 -0
- data/{public → vendor/extensions/clipped/public}/images/admin/assets/xml_icon.png +0 -0
- data/{public → vendor/extensions/clipped/public}/images/admin/assets/zip_icon.png +0 -0
- data/vendor/extensions/{assets → clipped}/public/javascripts/admin/assets.js +66 -8
- data/vendor/extensions/{assets → clipped}/public/stylesheets/sass/admin/assets.sass +12 -6
- data/vendor/extensions/clipped/radiant-clipped-extension.gemspec +33 -0
- data/vendor/extensions/{assets → clipped}/spec/controllers/admin/assets_controller_spec.rb +0 -0
- data/vendor/extensions/clipped/spec/controllers/admin/page_attachments_controller_spec.rb +50 -0
- data/vendor/extensions/{assets → clipped}/spec/datasets/assets_dataset.rb +2 -1
- data/vendor/extensions/{assets/spec/lib/tag_deprecation_spec.rb → clipped/spec/lib/asset_tags_spec.rb} +3 -15
- data/vendor/extensions/{assets → clipped}/spec/models/asset_spec.rb +3 -2
- data/vendor/extensions/{assets → clipped}/spec/models/asset_type_spec.rb +0 -0
- data/vendor/extensions/{assets → clipped}/spec/spec.opts +0 -0
- data/vendor/extensions/{assets → clipped}/spec/spec_helper.rb +0 -0
- data/vendor/extensions/{assets → clipped}/wireframes/edit-page-assets-2.bmml +0 -0
- data/vendor/extensions/{assets → clipped}/wireframes/edit-page-assets-2.png +0 -0
- data/vendor/extensions/{assets → clipped}/wireframes/edit-page-assets-3.bmml +0 -0
- data/vendor/extensions/{assets → clipped}/wireframes/edit-page-assets-3.png +0 -0
- data/vendor/extensions/{assets → clipped}/wireframes/edit-page-assets.bmml +0 -0
- data/vendor/extensions/{assets → clipped}/wireframes/edit-page-assets.png +0 -0
- data/vendor/extensions/{assets → clipped}/wireframes/edit-page.bmml +0 -0
- data/vendor/extensions/{assets → clipped}/wireframes/edit-page.png +0 -0
- data/vendor/extensions/sheets/Rakefile +30 -18
- data/vendor/extensions/sheets/app/controllers/admin/sheet_resource_controller.rb +1 -1
- data/vendor/extensions/sheets/app/models/sheet.rb +4 -0
- data/vendor/extensions/sheets/app/views/admin/scripts/index.html.haml +9 -5
- data/vendor/extensions/sheets/app/views/admin/styles/index.html.haml +1 -1
- data/vendor/extensions/sheets/config/locales/en.yml +3 -1
- data/vendor/extensions/sheets/features/admin/managing_javascripts.feature +65 -0
- data/vendor/extensions/sheets/features/admin/managing_stylesheets.feature +65 -0
- data/vendor/extensions/sheets/features/support/env.rb +2 -7
- data/vendor/extensions/sheets/features/support/paths.rb +9 -12
- data/vendor/extensions/sheets/lib/radiant-sheets-extension/version.rb +1 -1
- data/vendor/extensions/sheets/radiant-sheets-extension.gemspec +9 -4
- data/vendor/extensions/sheets/spec/datasets/javascripts_dataset.rb +3 -1
- data/vendor/extensions/sheets/spec/datasets/stylesheets_dataset.rb +3 -1
- data/vendor/extensions/sheets/spec/lib/javascript_tags_spec.rb +4 -4
- data/vendor/extensions/sheets/spec/lib/stylesheet_tags_spec.rb +4 -4
- metadata +189 -599
- data/Gemfile +0 -3
- data/lib/generators/extension/templates/cucumber_datasets_loader.rb +0 -3
- data/public/assets/1/2375_1115822414591_1197894784_30347214_1109_n.jpg +0 -0
- data/public/assets/1/2375_1115822414591_1197894784_30347214_1109_n_icon.png +0 -0
- data/public/assets/1/2375_1115822414591_1197894784_30347214_1109_n_normal.jpg +0 -0
- data/public/assets/1/2375_1115822414591_1197894784_30347214_1109_n_thumbnail.png +0 -0
- data/public/images/roasters/banner.jpg +0 -0
- data/public/images/roasters/closelabel.gif +0 -0
- data/public/images/roasters/comment.png +0 -0
- data/public/images/roasters/gallery1.jpg +0 -0
- data/public/images/roasters/gallery2.jpg +0 -0
- data/public/images/roasters/gallery3.jpg +0 -0
- data/public/images/roasters/gallery4.jpg +0 -0
- data/public/images/roasters/gift.gif +0 -0
- data/public/images/roasters/green.gif +0 -0
- data/public/images/roasters/nav-background.gif +0 -0
- data/public/images/roasters/nav-divider.gif +0 -0
- data/public/images/roasters/nextlabel.gif +0 -0
- data/public/images/roasters/open.gif +0 -0
- data/public/images/roasters/preview-1.jpg +0 -0
- data/public/images/roasters/preview.jpg +0 -0
- data/public/images/roasters/prevlabel.gif +0 -0
- data/public/images/roasters/prize.gif +0 -0
- data/public/images/roasters/recycle.gif +0 -0
- data/public/images/roasters/rss.gif +0 -0
- data/public/images/roasters/thumb-grinder.jpg +0 -0
- data/public/images/roasters/thumb-grower.jpg +0 -0
- data/public/images/roasters/thumb-roaster.jpg +0 -0
- data/public/images/roasters/truck.gif +0 -0
- data/vendor/extensions/assets/HELP_admin.markdown +0 -69
- data/vendor/extensions/assets/VERSION +0 -1
- data/vendor/extensions/assets/app/controllers/admin/page_attachments_controller.rb +0 -45
- data/vendor/extensions/assets/app/helpers/admin/assets_helper.rb +0 -11
- data/vendor/extensions/assets/app/models/page_attachment.rb +0 -14
- data/vendor/extensions/assets/app/views/admin/assets/_errors.html.haml +0 -3
- data/vendor/extensions/assets/app/views/admin/page_attachments/_attachment.html.haml +0 -22
- data/vendor/extensions/assets/app/views/admin/page_attachments/_new_attachment.html.haml +0 -18
- data/vendor/extensions/assets/app/views/admin/pages/_assets.html.haml +0 -13
- data/vendor/extensions/assets/app/views/admin/removed/_show_bucket_link.html.haml +0 -4
- data/vendor/extensions/assets/lib/tag_deprecation.rb +0 -73
- data/vendor/extensions/assets/public/flash/ZeroClipboard.swf +0 -0
- data/vendor/extensions/assets/public/images/admin/assets/add.png +0 -0
- data/vendor/extensions/assets/public/images/admin/assets/archive_icon.png +0 -0
- data/vendor/extensions/assets/public/images/admin/assets/audio_icon.png +0 -0
- data/vendor/extensions/assets/public/images/admin/assets/audio_thumbnail.png +0 -0
- data/vendor/extensions/assets/public/images/admin/assets/c_icon.png +0 -0
- data/vendor/extensions/assets/public/images/admin/assets/copy.png +0 -0
- data/vendor/extensions/assets/public/images/admin/assets/css_icon.png +0 -0
- data/vendor/extensions/assets/public/images/admin/assets/database_icon.png +0 -0
- data/vendor/extensions/assets/public/images/admin/assets/delete.png +0 -0
- data/vendor/extensions/assets/public/images/admin/assets/document_icon.png +0 -0
- data/vendor/extensions/assets/public/images/admin/assets/document_thumbnail.png +0 -0
- data/vendor/extensions/assets/public/images/admin/assets/flash_icon.png +0 -0
- data/vendor/extensions/assets/public/images/admin/assets/flash_thumbnail.png +0 -0
- data/vendor/extensions/assets/public/images/admin/assets/font_icon.png +0 -0
- data/vendor/extensions/assets/public/images/admin/assets/gzip_icon.png +0 -0
- data/vendor/extensions/assets/public/images/admin/assets/html_icon.png +0 -0
- data/vendor/extensions/assets/public/images/admin/assets/image_icon.png +0 -0
- data/vendor/extensions/assets/public/images/admin/assets/image_thumbnail.png +0 -0
- data/vendor/extensions/assets/public/images/admin/assets/java_icon.png +0 -0
- data/vendor/extensions/assets/public/images/admin/assets/page_edit.png +0 -0
- data/vendor/extensions/assets/public/images/admin/assets/perl_icon.png +0 -0
- data/vendor/extensions/assets/public/images/admin/assets/php_icon.png +0 -0
- data/vendor/extensions/assets/public/images/admin/assets/presentation_icon.png +0 -0
- data/vendor/extensions/assets/public/images/admin/assets/python_icon.png +0 -0
- data/vendor/extensions/assets/public/images/admin/assets/reorder_assets.png +0 -0
- data/vendor/extensions/assets/public/images/admin/assets/ruby_icon.png +0 -0
- data/vendor/extensions/assets/public/images/admin/assets/script_icon.png +0 -0
- data/vendor/extensions/assets/public/images/admin/assets/spreadsheet_icon.png +0 -0
- data/vendor/extensions/assets/public/images/admin/assets/tar_icon.png +0 -0
- data/vendor/extensions/assets/public/images/admin/assets/unknown_icon.png +0 -0
- data/vendor/extensions/assets/public/images/admin/assets/unknown_thumbnail.png +0 -0
- data/vendor/extensions/assets/public/images/admin/assets/video_icon.png +0 -0
- data/vendor/extensions/assets/public/images/admin/assets/video_thumbnail.png +0 -0
- data/vendor/extensions/assets/public/images/admin/assets/xml_icon.png +0 -0
- data/vendor/extensions/assets/public/images/admin/assets/zip_icon.png +0 -0
- data/vendor/extensions/assets/spec/controllers/admin/page_attachment_controller_spec.rb +0 -51
- data/vendor/extensions/assets/spec/lib/asset_tags_spec.rb +0 -9
- data/vendor/plugins/haml/CONTRIBUTING +0 -4
- data/vendor/plugins/haml/MIT-LICENSE +0 -20
- data/vendor/plugins/haml/README.md +0 -298
- data/vendor/plugins/haml/Rakefile +0 -436
- data/vendor/plugins/haml/TODO +0 -53
- data/vendor/plugins/haml/VERSION +0 -1
- data/vendor/plugins/haml/VERSION_NAME +0 -1
- data/vendor/plugins/haml/bin/css2sass +0 -13
- data/vendor/plugins/haml/bin/haml +0 -9
- data/vendor/plugins/haml/bin/html2haml +0 -7
- data/vendor/plugins/haml/bin/sass +0 -8
- data/vendor/plugins/haml/bin/sass-convert +0 -7
- data/vendor/plugins/haml/doc-src/FAQ.md +0 -187
- data/vendor/plugins/haml/doc-src/HAML_CHANGELOG.md +0 -1091
- data/vendor/plugins/haml/doc-src/HAML_REFERENCE.md +0 -1344
- data/vendor/plugins/haml/doc-src/INDENTED_SYNTAX.md +0 -210
- data/vendor/plugins/haml/doc-src/SASS_CHANGELOG.md +0 -1914
- data/vendor/plugins/haml/doc-src/SASS_REFERENCE.md +0 -1680
- data/vendor/plugins/haml/doc-src/SCSS_FOR_SASS_USERS.md +0 -155
- data/vendor/plugins/haml/ext/extconf.rb +0 -10
- data/vendor/plugins/haml/extra/haml-mode.el +0 -753
- data/vendor/plugins/haml/extra/sass-mode.el +0 -207
- data/vendor/plugins/haml/extra/update_watch.rb +0 -13
- data/vendor/plugins/haml/haml.gemspec +0 -35
- data/vendor/plugins/haml/init.rb +0 -18
- data/vendor/plugins/haml/init.rbc +0 -404
- data/vendor/plugins/haml/lib/haml.rb +0 -44
- data/vendor/plugins/haml/lib/haml.rbc +0 -569
- data/vendor/plugins/haml/lib/haml/buffer.rb +0 -320
- data/vendor/plugins/haml/lib/haml/buffer.rbc +0 -4048
- data/vendor/plugins/haml/lib/haml/engine.rb +0 -308
- data/vendor/plugins/haml/lib/haml/engine.rbc +0 -3852
- data/vendor/plugins/haml/lib/haml/error.rb +0 -22
- data/vendor/plugins/haml/lib/haml/error.rbc +0 -339
- data/vendor/plugins/haml/lib/haml/exec.rb +0 -862
- data/vendor/plugins/haml/lib/haml/filters.rb +0 -371
- data/vendor/plugins/haml/lib/haml/filters.rbc +0 -5617
- data/vendor/plugins/haml/lib/haml/helpers.rb +0 -605
- data/vendor/plugins/haml/lib/haml/helpers.rbc +0 -7086
- data/vendor/plugins/haml/lib/haml/helpers/action_view_extensions.rb +0 -57
- data/vendor/plugins/haml/lib/haml/helpers/action_view_extensions.rbc +0 -522
- data/vendor/plugins/haml/lib/haml/helpers/action_view_mods.rb +0 -244
- data/vendor/plugins/haml/lib/haml/helpers/action_view_mods.rbc +0 -5515
- data/vendor/plugins/haml/lib/haml/helpers/xss_mods.rb +0 -165
- data/vendor/plugins/haml/lib/haml/html.rb +0 -428
- data/vendor/plugins/haml/lib/haml/html/erb.rb +0 -141
- data/vendor/plugins/haml/lib/haml/precompiler.rb +0 -1104
- data/vendor/plugins/haml/lib/haml/precompiler.rbc +0 -22247
- data/vendor/plugins/haml/lib/haml/railtie.rb +0 -21
- data/vendor/plugins/haml/lib/haml/railtie.rbc +0 -409
- data/vendor/plugins/haml/lib/haml/root.rb +0 -7
- data/vendor/plugins/haml/lib/haml/root.rbc +0 -160
- data/vendor/plugins/haml/lib/haml/shared.rb +0 -78
- data/vendor/plugins/haml/lib/haml/shared.rbc +0 -1137
- data/vendor/plugins/haml/lib/haml/template.rb +0 -97
- data/vendor/plugins/haml/lib/haml/template.rbc +0 -1838
- data/vendor/plugins/haml/lib/haml/template/options.rb +0 -16
- data/vendor/plugins/haml/lib/haml/template/options.rbc +0 -235
- data/vendor/plugins/haml/lib/haml/template/patch.rb +0 -58
- data/vendor/plugins/haml/lib/haml/template/plugin.rb +0 -122
- data/vendor/plugins/haml/lib/haml/template/plugin.rbc +0 -2720
- data/vendor/plugins/haml/lib/haml/util.rb +0 -809
- data/vendor/plugins/haml/lib/haml/util.rbc +0 -12059
- data/vendor/plugins/haml/lib/haml/util/subset_map.rb +0 -101
- data/vendor/plugins/haml/lib/haml/util/subset_map.rbc +0 -1316
- data/vendor/plugins/haml/lib/haml/version.rb +0 -102
- data/vendor/plugins/haml/lib/haml/version.rbc +0 -1671
- data/vendor/plugins/haml/lib/sass.rb +0 -29
- data/vendor/plugins/haml/lib/sass.rbc +0 -492
- data/vendor/plugins/haml/lib/sass/callbacks.rb +0 -52
- data/vendor/plugins/haml/lib/sass/callbacks.rbc +0 -388
- data/vendor/plugins/haml/lib/sass/css.rb +0 -294
- data/vendor/plugins/haml/lib/sass/engine.rb +0 -720
- data/vendor/plugins/haml/lib/sass/engine.rbc +0 -17020
- data/vendor/plugins/haml/lib/sass/environment.rb +0 -143
- data/vendor/plugins/haml/lib/sass/environment.rbc +0 -1751
- data/vendor/plugins/haml/lib/sass/error.rb +0 -198
- data/vendor/plugins/haml/lib/sass/error.rbc +0 -2801
- data/vendor/plugins/haml/lib/sass/files.rb +0 -160
- data/vendor/plugins/haml/lib/sass/files.rbc +0 -3118
- data/vendor/plugins/haml/lib/sass/less.rb +0 -382
- data/vendor/plugins/haml/lib/sass/plugin.rb +0 -276
- data/vendor/plugins/haml/lib/sass/plugin.rbc +0 -4356
- data/vendor/plugins/haml/lib/sass/plugin/configuration.rb +0 -221
- data/vendor/plugins/haml/lib/sass/plugin/configuration.rbc +0 -1343
- data/vendor/plugins/haml/lib/sass/plugin/generic.rb +0 -15
- data/vendor/plugins/haml/lib/sass/plugin/merb.rb +0 -37
- data/vendor/plugins/haml/lib/sass/plugin/rack.rb +0 -47
- data/vendor/plugins/haml/lib/sass/plugin/rack.rbc +0 -446
- data/vendor/plugins/haml/lib/sass/plugin/rails.rb +0 -32
- data/vendor/plugins/haml/lib/sass/plugin/rails.rbc +0 -879
- data/vendor/plugins/haml/lib/sass/plugin/staleness_checker.rb +0 -123
- data/vendor/plugins/haml/lib/sass/plugin/staleness_checker.rbc +0 -2019
- data/vendor/plugins/haml/lib/sass/repl.rb +0 -58
- data/vendor/plugins/haml/lib/sass/script.rb +0 -63
- data/vendor/plugins/haml/lib/sass/script.rbc +0 -1188
- data/vendor/plugins/haml/lib/sass/script/bool.rb +0 -18
- data/vendor/plugins/haml/lib/sass/script/bool.rbc +0 -366
- data/vendor/plugins/haml/lib/sass/script/color.rb +0 -491
- data/vendor/plugins/haml/lib/sass/script/color.rbc +0 -8148
- data/vendor/plugins/haml/lib/sass/script/css_lexer.rb +0 -29
- data/vendor/plugins/haml/lib/sass/script/css_lexer.rbc +0 -809
- data/vendor/plugins/haml/lib/sass/script/css_parser.rb +0 -31
- data/vendor/plugins/haml/lib/sass/script/css_parser.rbc +0 -628
- data/vendor/plugins/haml/lib/sass/script/funcall.rb +0 -77
- data/vendor/plugins/haml/lib/sass/script/funcall.rbc +0 -1805
- data/vendor/plugins/haml/lib/sass/script/functions.rb +0 -861
- data/vendor/plugins/haml/lib/sass/script/functions.rbc +0 -8418
- data/vendor/plugins/haml/lib/sass/script/interpolation.rb +0 -70
- data/vendor/plugins/haml/lib/sass/script/interpolation.rbc +0 -1225
- data/vendor/plugins/haml/lib/sass/script/lexer.rb +0 -337
- data/vendor/plugins/haml/lib/sass/script/lexer.rbc +0 -7231
- data/vendor/plugins/haml/lib/sass/script/literal.rb +0 -236
- data/vendor/plugins/haml/lib/sass/script/literal.rbc +0 -3365
- data/vendor/plugins/haml/lib/sass/script/node.rb +0 -112
- data/vendor/plugins/haml/lib/sass/script/node.rbc +0 -1418
- data/vendor/plugins/haml/lib/sass/script/number.rb +0 -423
- data/vendor/plugins/haml/lib/sass/script/number.rbc +0 -6024
- data/vendor/plugins/haml/lib/sass/script/operation.rb +0 -95
- data/vendor/plugins/haml/lib/sass/script/operation.rbc +0 -1856
- data/vendor/plugins/haml/lib/sass/script/parser.rb +0 -401
- data/vendor/plugins/haml/lib/sass/script/parser.rbc +0 -8418
- data/vendor/plugins/haml/lib/sass/script/string.rb +0 -67
- data/vendor/plugins/haml/lib/sass/script/string.rbc +0 -1357
- data/vendor/plugins/haml/lib/sass/script/string_interpolation.rb +0 -93
- data/vendor/plugins/haml/lib/sass/script/string_interpolation.rbc +0 -1643
- data/vendor/plugins/haml/lib/sass/script/unary_operation.rb +0 -57
- data/vendor/plugins/haml/lib/sass/script/unary_operation.rbc +0 -1144
- data/vendor/plugins/haml/lib/sass/script/variable.rb +0 -48
- data/vendor/plugins/haml/lib/sass/script/variable.rbc +0 -844
- data/vendor/plugins/haml/lib/sass/scss.rb +0 -17
- data/vendor/plugins/haml/lib/sass/scss.rbc +0 -242
- data/vendor/plugins/haml/lib/sass/scss/css_parser.rb +0 -46
- data/vendor/plugins/haml/lib/sass/scss/css_parser.rbc +0 -1106
- data/vendor/plugins/haml/lib/sass/scss/parser.rb +0 -846
- data/vendor/plugins/haml/lib/sass/scss/parser.rbc +0 -19348
- data/vendor/plugins/haml/lib/sass/scss/rx.rb +0 -126
- data/vendor/plugins/haml/lib/sass/scss/rx.rbc +0 -2849
- data/vendor/plugins/haml/lib/sass/scss/sass_parser.rb +0 -11
- data/vendor/plugins/haml/lib/sass/scss/sass_parser.rbc +0 -287
- data/vendor/plugins/haml/lib/sass/scss/script_lexer.rb +0 -15
- data/vendor/plugins/haml/lib/sass/scss/script_lexer.rbc +0 -439
- data/vendor/plugins/haml/lib/sass/scss/script_parser.rb +0 -25
- data/vendor/plugins/haml/lib/sass/scss/script_parser.rbc +0 -482
- data/vendor/plugins/haml/lib/sass/scss/static_parser.rb +0 -40
- data/vendor/plugins/haml/lib/sass/scss/static_parser.rbc +0 -971
- data/vendor/plugins/haml/lib/sass/selector.rb +0 -361
- data/vendor/plugins/haml/lib/sass/selector.rbc +0 -4193
- data/vendor/plugins/haml/lib/sass/selector/abstract_sequence.rb +0 -62
- data/vendor/plugins/haml/lib/sass/selector/abstract_sequence.rbc +0 -798
- data/vendor/plugins/haml/lib/sass/selector/comma_sequence.rb +0 -82
- data/vendor/plugins/haml/lib/sass/selector/comma_sequence.rbc +0 -1814
- data/vendor/plugins/haml/lib/sass/selector/sequence.rb +0 -237
- data/vendor/plugins/haml/lib/sass/selector/sequence.rbc +0 -4928
- data/vendor/plugins/haml/lib/sass/selector/simple.rb +0 -113
- data/vendor/plugins/haml/lib/sass/selector/simple.rbc +0 -1553
- data/vendor/plugins/haml/lib/sass/selector/simple_sequence.rb +0 -136
- data/vendor/plugins/haml/lib/sass/selector/simple_sequence.rbc +0 -2346
- data/vendor/plugins/haml/lib/sass/tree/charset_node.rb +0 -37
- data/vendor/plugins/haml/lib/sass/tree/charset_node.rbc +0 -606
- data/vendor/plugins/haml/lib/sass/tree/comment_node.rb +0 -128
- data/vendor/plugins/haml/lib/sass/tree/comment_node.rbc +0 -2397
- data/vendor/plugins/haml/lib/sass/tree/debug_node.rb +0 -36
- data/vendor/plugins/haml/lib/sass/tree/debug_node.rbc +0 -740
- data/vendor/plugins/haml/lib/sass/tree/directive_node.rb +0 -75
- data/vendor/plugins/haml/lib/sass/tree/directive_node.rbc +0 -1302
- data/vendor/plugins/haml/lib/sass/tree/extend_node.rb +0 -65
- data/vendor/plugins/haml/lib/sass/tree/extend_node.rbc +0 -1276
- data/vendor/plugins/haml/lib/sass/tree/for_node.rb +0 -67
- data/vendor/plugins/haml/lib/sass/tree/for_node.rbc +0 -1145
- data/vendor/plugins/haml/lib/sass/tree/if_node.rb +0 -81
- data/vendor/plugins/haml/lib/sass/tree/if_node.rbc +0 -1119
- data/vendor/plugins/haml/lib/sass/tree/import_node.rb +0 -102
- data/vendor/plugins/haml/lib/sass/tree/import_node.rbc +0 -2242
- data/vendor/plugins/haml/lib/sass/tree/mixin_def_node.rb +0 -60
- data/vendor/plugins/haml/lib/sass/tree/mixin_def_node.rbc +0 -1001
- data/vendor/plugins/haml/lib/sass/tree/mixin_node.rb +0 -123
- data/vendor/plugins/haml/lib/sass/tree/mixin_node.rbc +0 -3355
- data/vendor/plugins/haml/lib/sass/tree/node.rb +0 -465
- data/vendor/plugins/haml/lib/sass/tree/node.rbc +0 -5533
- data/vendor/plugins/haml/lib/sass/tree/prop_node.rb +0 -220
- data/vendor/plugins/haml/lib/sass/tree/prop_node.rbc +0 -3949
- data/vendor/plugins/haml/lib/sass/tree/root_node.rb +0 -157
- data/vendor/plugins/haml/lib/sass/tree/root_node.rbc +0 -3112
- data/vendor/plugins/haml/lib/sass/tree/rule_node.rb +0 -273
- data/vendor/plugins/haml/lib/sass/tree/rule_node.rbc +0 -5636
- data/vendor/plugins/haml/lib/sass/tree/variable_node.rb +0 -39
- data/vendor/plugins/haml/lib/sass/tree/variable_node.rbc +0 -845
- data/vendor/plugins/haml/lib/sass/tree/warn_node.rb +0 -42
- data/vendor/plugins/haml/lib/sass/tree/warn_node.rbc +0 -1043
- data/vendor/plugins/haml/lib/sass/tree/while_node.rb +0 -48
- data/vendor/plugins/haml/lib/sass/tree/while_node.rbc +0 -722
- data/vendor/plugins/haml/rails/init.rb +0 -1
- data/vendor/plugins/haml/test/benchmark.rb +0 -99
- data/vendor/plugins/haml/test/haml/engine_test.rb +0 -1805
- data/vendor/plugins/haml/test/haml/erb/_av_partial_1.erb +0 -12
- data/vendor/plugins/haml/test/haml/erb/_av_partial_2.erb +0 -8
- data/vendor/plugins/haml/test/haml/erb/action_view.erb +0 -62
- data/vendor/plugins/haml/test/haml/erb/standard.erb +0 -54
- data/vendor/plugins/haml/test/haml/helper_test.rb +0 -450
- data/vendor/plugins/haml/test/haml/html2haml/erb_tests.rb +0 -426
- data/vendor/plugins/haml/test/haml/html2haml_test.rb +0 -336
- data/vendor/plugins/haml/test/haml/markaby/standard.mab +0 -52
- data/vendor/plugins/haml/test/haml/mocks/article.rb +0 -6
- data/vendor/plugins/haml/test/haml/results/content_for_layout.xhtml +0 -12
- data/vendor/plugins/haml/test/haml/results/eval_suppressed.xhtml +0 -9
- data/vendor/plugins/haml/test/haml/results/filters.xhtml +0 -62
- data/vendor/plugins/haml/test/haml/results/helpers.xhtml +0 -70
- data/vendor/plugins/haml/test/haml/results/helpful.xhtml +0 -10
- data/vendor/plugins/haml/test/haml/results/just_stuff.xhtml +0 -70
- data/vendor/plugins/haml/test/haml/results/list.xhtml +0 -12
- data/vendor/plugins/haml/test/haml/results/nuke_inner_whitespace.xhtml +0 -40
- data/vendor/plugins/haml/test/haml/results/nuke_outer_whitespace.xhtml +0 -148
- data/vendor/plugins/haml/test/haml/results/original_engine.xhtml +0 -20
- data/vendor/plugins/haml/test/haml/results/partial_layout.xhtml +0 -5
- data/vendor/plugins/haml/test/haml/results/partials.xhtml +0 -21
- data/vendor/plugins/haml/test/haml/results/render_layout.xhtml +0 -3
- data/vendor/plugins/haml/test/haml/results/silent_script.xhtml +0 -74
- data/vendor/plugins/haml/test/haml/results/standard.xhtml +0 -162
- data/vendor/plugins/haml/test/haml/results/tag_parsing.xhtml +0 -23
- data/vendor/plugins/haml/test/haml/results/very_basic.xhtml +0 -5
- data/vendor/plugins/haml/test/haml/results/whitespace_handling.xhtml +0 -89
- data/vendor/plugins/haml/test/haml/spec/LICENSE +0 -14
- data/vendor/plugins/haml/test/haml/spec/README.md +0 -106
- data/vendor/plugins/haml/test/haml/spec/lua_haml_spec.lua +0 -38
- data/vendor/plugins/haml/test/haml/spec/perl_haml_test.pl +0 -81
- data/vendor/plugins/haml/test/haml/spec/ruby_haml_test.rb +0 -19
- data/vendor/plugins/haml/test/haml/spec/tests.json +0 -603
- data/vendor/plugins/haml/test/haml/spec_test.rb +0 -44
- data/vendor/plugins/haml/test/haml/template_test.rb +0 -417
- data/vendor/plugins/haml/test/haml/templates/_av_partial_1.haml +0 -9
- data/vendor/plugins/haml/test/haml/templates/_av_partial_1_ugly.haml +0 -9
- data/vendor/plugins/haml/test/haml/templates/_av_partial_2.haml +0 -5
- data/vendor/plugins/haml/test/haml/templates/_av_partial_2_ugly.haml +0 -5
- data/vendor/plugins/haml/test/haml/templates/_layout.erb +0 -3
- data/vendor/plugins/haml/test/haml/templates/_layout_for_partial.haml +0 -3
- data/vendor/plugins/haml/test/haml/templates/_partial.haml +0 -8
- data/vendor/plugins/haml/test/haml/templates/_text_area.haml +0 -3
- data/vendor/plugins/haml/test/haml/templates/action_view.haml +0 -47
- data/vendor/plugins/haml/test/haml/templates/action_view_ugly.haml +0 -47
- data/vendor/plugins/haml/test/haml/templates/breakage.haml +0 -8
- data/vendor/plugins/haml/test/haml/templates/content_for_layout.haml +0 -8
- data/vendor/plugins/haml/test/haml/templates/eval_suppressed.haml +0 -11
- data/vendor/plugins/haml/test/haml/templates/filters.haml +0 -66
- data/vendor/plugins/haml/test/haml/templates/helpers.haml +0 -55
- data/vendor/plugins/haml/test/haml/templates/helpful.haml +0 -11
- data/vendor/plugins/haml/test/haml/templates/just_stuff.haml +0 -85
- data/vendor/plugins/haml/test/haml/templates/list.haml +0 -12
- data/vendor/plugins/haml/test/haml/templates/nuke_inner_whitespace.haml +0 -32
- data/vendor/plugins/haml/test/haml/templates/nuke_outer_whitespace.haml +0 -144
- data/vendor/plugins/haml/test/haml/templates/original_engine.haml +0 -17
- data/vendor/plugins/haml/test/haml/templates/partial_layout.haml +0 -7
- data/vendor/plugins/haml/test/haml/templates/partialize.haml +0 -1
- data/vendor/plugins/haml/test/haml/templates/partials.haml +0 -12
- data/vendor/plugins/haml/test/haml/templates/render_layout.haml +0 -2
- data/vendor/plugins/haml/test/haml/templates/silent_script.haml +0 -40
- data/vendor/plugins/haml/test/haml/templates/standard.haml +0 -42
- data/vendor/plugins/haml/test/haml/templates/standard_ugly.haml +0 -42
- data/vendor/plugins/haml/test/haml/templates/tag_parsing.haml +0 -21
- data/vendor/plugins/haml/test/haml/templates/very_basic.haml +0 -4
- data/vendor/plugins/haml/test/haml/templates/whitespace_handling.haml +0 -87
- data/vendor/plugins/haml/test/haml/util/subset_map_test.rb +0 -91
- data/vendor/plugins/haml/test/haml/util_test.rb +0 -268
- data/vendor/plugins/haml/test/linked_rails.rb +0 -42
- data/vendor/plugins/haml/test/sass/callbacks_test.rb +0 -61
- data/vendor/plugins/haml/test/sass/conversion_test.rb +0 -1218
- data/vendor/plugins/haml/test/sass/css2sass_test.rb +0 -364
- data/vendor/plugins/haml/test/sass/data/hsl-rgb.txt +0 -319
- data/vendor/plugins/haml/test/sass/engine_test.rb +0 -2263
- data/vendor/plugins/haml/test/sass/extend_test.rb +0 -1348
- data/vendor/plugins/haml/test/sass/functions_test.rb +0 -556
- data/vendor/plugins/haml/test/sass/less_conversion_test.rb +0 -653
- data/vendor/plugins/haml/test/sass/more_results/more1.css +0 -9
- data/vendor/plugins/haml/test/sass/more_results/more1_with_line_comments.css +0 -26
- data/vendor/plugins/haml/test/sass/more_results/more_import.css +0 -29
- data/vendor/plugins/haml/test/sass/more_templates/_more_partial.sass +0 -2
- data/vendor/plugins/haml/test/sass/more_templates/more1.sass +0 -23
- data/vendor/plugins/haml/test/sass/more_templates/more_import.sass +0 -11
- data/vendor/plugins/haml/test/sass/plugin_test.rb +0 -433
- data/vendor/plugins/haml/test/sass/results/alt.css +0 -4
- data/vendor/plugins/haml/test/sass/results/basic.css +0 -9
- data/vendor/plugins/haml/test/sass/results/compact.css +0 -5
- data/vendor/plugins/haml/test/sass/results/complex.css +0 -86
- data/vendor/plugins/haml/test/sass/results/compressed.css +0 -1
- data/vendor/plugins/haml/test/sass/results/expanded.css +0 -19
- data/vendor/plugins/haml/test/sass/results/import.css +0 -31
- data/vendor/plugins/haml/test/sass/results/import_charset.css +0 -4
- data/vendor/plugins/haml/test/sass/results/import_charset_1_8.css +0 -4
- data/vendor/plugins/haml/test/sass/results/import_charset_ibm866.css +0 -4
- data/vendor/plugins/haml/test/sass/results/line_numbers.css +0 -49
- data/vendor/plugins/haml/test/sass/results/mixins.css +0 -95
- data/vendor/plugins/haml/test/sass/results/multiline.css +0 -24
- data/vendor/plugins/haml/test/sass/results/nested.css +0 -22
- data/vendor/plugins/haml/test/sass/results/options.css +0 -1
- data/vendor/plugins/haml/test/sass/results/parent_ref.css +0 -13
- data/vendor/plugins/haml/test/sass/results/script.css +0 -16
- data/vendor/plugins/haml/test/sass/results/scss_import.css +0 -31
- data/vendor/plugins/haml/test/sass/results/scss_importee.css +0 -2
- data/vendor/plugins/haml/test/sass/results/subdir/nested_subdir/nested_subdir.css +0 -1
- data/vendor/plugins/haml/test/sass/results/subdir/subdir.css +0 -3
- data/vendor/plugins/haml/test/sass/results/units.css +0 -11
- data/vendor/plugins/haml/test/sass/results/warn_imported.css +0 -0
- data/vendor/plugins/haml/test/sass/script_conversion_test.rb +0 -314
- data/vendor/plugins/haml/test/sass/script_test.rb +0 -470
- data/vendor/plugins/haml/test/sass/scss/css_test.rb +0 -916
- data/vendor/plugins/haml/test/sass/scss/rx_test.rb +0 -156
- data/vendor/plugins/haml/test/sass/scss/scss_test.rb +0 -1088
- data/vendor/plugins/haml/test/sass/scss/test_helper.rb +0 -37
- data/vendor/plugins/haml/test/sass/templates/_imported_charset_ibm866.sass +0 -4
- data/vendor/plugins/haml/test/sass/templates/_imported_charset_utf8.sass +0 -4
- data/vendor/plugins/haml/test/sass/templates/_partial.sass +0 -2
- data/vendor/plugins/haml/test/sass/templates/alt.sass +0 -16
- data/vendor/plugins/haml/test/sass/templates/basic.sass +0 -23
- data/vendor/plugins/haml/test/sass/templates/bork1.sass +0 -2
- data/vendor/plugins/haml/test/sass/templates/bork2.sass +0 -2
- data/vendor/plugins/haml/test/sass/templates/bork3.sass +0 -2
- data/vendor/plugins/haml/test/sass/templates/bork4.sass +0 -2
- data/vendor/plugins/haml/test/sass/templates/compact.sass +0 -17
- data/vendor/plugins/haml/test/sass/templates/complex.sass +0 -305
- data/vendor/plugins/haml/test/sass/templates/compressed.sass +0 -15
- data/vendor/plugins/haml/test/sass/templates/expanded.sass +0 -17
- data/vendor/plugins/haml/test/sass/templates/import.sass +0 -12
- data/vendor/plugins/haml/test/sass/templates/import_charset.sass +0 -7
- data/vendor/plugins/haml/test/sass/templates/import_charset_1_8.sass +0 -4
- data/vendor/plugins/haml/test/sass/templates/import_charset_ibm866.sass +0 -9
- data/vendor/plugins/haml/test/sass/templates/importee.less +0 -2
- data/vendor/plugins/haml/test/sass/templates/importee.sass +0 -19
- data/vendor/plugins/haml/test/sass/templates/line_numbers.sass +0 -13
- data/vendor/plugins/haml/test/sass/templates/mixin_bork.sass +0 -5
- data/vendor/plugins/haml/test/sass/templates/mixins.sass +0 -76
- data/vendor/plugins/haml/test/sass/templates/multiline.sass +0 -20
- data/vendor/plugins/haml/test/sass/templates/nested.sass +0 -25
- data/vendor/plugins/haml/test/sass/templates/nested_bork1.sass +0 -2
- data/vendor/plugins/haml/test/sass/templates/nested_bork2.sass +0 -2
- data/vendor/plugins/haml/test/sass/templates/nested_bork3.sass +0 -2
- data/vendor/plugins/haml/test/sass/templates/nested_bork4.sass +0 -2
- data/vendor/plugins/haml/test/sass/templates/nested_mixin_bork.sass +0 -6
- data/vendor/plugins/haml/test/sass/templates/options.sass +0 -2
- data/vendor/plugins/haml/test/sass/templates/parent_ref.sass +0 -25
- data/vendor/plugins/haml/test/sass/templates/script.sass +0 -101
- data/vendor/plugins/haml/test/sass/templates/scss_import.scss +0 -11
- data/vendor/plugins/haml/test/sass/templates/scss_importee.scss +0 -1
- data/vendor/plugins/haml/test/sass/templates/subdir/nested_subdir/_nested_partial.sass +0 -2
- data/vendor/plugins/haml/test/sass/templates/subdir/nested_subdir/nested_subdir.sass +0 -3
- data/vendor/plugins/haml/test/sass/templates/subdir/subdir.sass +0 -6
- data/vendor/plugins/haml/test/sass/templates/units.sass +0 -11
- data/vendor/plugins/haml/test/sass/templates/warn.sass +0 -3
- data/vendor/plugins/haml/test/sass/templates/warn_imported.sass +0 -4
- data/vendor/plugins/haml/test/test_helper.rb +0 -98
- data/vendor/plugins/haml/vendor/fssm/LICENSE +0 -20
- data/vendor/plugins/haml/vendor/fssm/README.markdown +0 -55
- data/vendor/plugins/haml/vendor/fssm/Rakefile +0 -59
- data/vendor/plugins/haml/vendor/fssm/VERSION.yml +0 -5
- data/vendor/plugins/haml/vendor/fssm/example.rb +0 -9
- data/vendor/plugins/haml/vendor/fssm/fssm.gemspec +0 -77
- data/vendor/plugins/haml/vendor/fssm/lib/fssm.rb +0 -33
- data/vendor/plugins/haml/vendor/fssm/lib/fssm/backends/fsevents.rb +0 -36
- data/vendor/plugins/haml/vendor/fssm/lib/fssm/backends/inotify.rb +0 -26
- data/vendor/plugins/haml/vendor/fssm/lib/fssm/backends/polling.rb +0 -25
- data/vendor/plugins/haml/vendor/fssm/lib/fssm/backends/rubycocoa/fsevents.rb +0 -131
- data/vendor/plugins/haml/vendor/fssm/lib/fssm/monitor.rb +0 -26
- data/vendor/plugins/haml/vendor/fssm/lib/fssm/path.rb +0 -91
- data/vendor/plugins/haml/vendor/fssm/lib/fssm/pathname.rb +0 -502
- data/vendor/plugins/haml/vendor/fssm/lib/fssm/state/directory.rb +0 -57
- data/vendor/plugins/haml/vendor/fssm/lib/fssm/state/file.rb +0 -24
- data/vendor/plugins/haml/vendor/fssm/lib/fssm/support.rb +0 -63
- data/vendor/plugins/haml/vendor/fssm/lib/fssm/tree.rb +0 -176
- data/vendor/plugins/haml/vendor/fssm/profile/prof-cache.rb +0 -40
- data/vendor/plugins/haml/vendor/fssm/profile/prof-fssm-pathname.html +0 -1231
- data/vendor/plugins/haml/vendor/fssm/profile/prof-pathname.rb +0 -68
- data/vendor/plugins/haml/vendor/fssm/profile/prof-plain-pathname.html +0 -988
- data/vendor/plugins/haml/vendor/fssm/profile/prof.html +0 -2379
- data/vendor/plugins/haml/vendor/fssm/spec/path_spec.rb +0 -75
- data/vendor/plugins/haml/vendor/fssm/spec/root/duck/quack.txt +0 -0
- data/vendor/plugins/haml/vendor/fssm/spec/root/file.css +0 -0
- data/vendor/plugins/haml/vendor/fssm/spec/root/file.rb +0 -0
- data/vendor/plugins/haml/vendor/fssm/spec/root/file.yml +0 -0
- data/vendor/plugins/haml/vendor/fssm/spec/root/moo/cow.txt +0 -0
- data/vendor/plugins/haml/vendor/fssm/spec/spec_helper.rb +0 -14
- data/vendor/plugins/haml/yard/callbacks.rb +0 -29
- data/vendor/plugins/haml/yard/default/fulldoc/html/css/common.sass +0 -26
- data/vendor/plugins/haml/yard/default/layout/html/footer.erb +0 -12
- data/vendor/plugins/haml/yard/inherited_hash.rb +0 -41
@@ -1,155 +0,0 @@
|
|
1
|
-
# Intro to SCSS for Sass Users
|
2
|
-
|
3
|
-
Sass 3 introduces a new syntax known as SCSS
|
4
|
-
which is fully compatible with the syntax of CSS3,
|
5
|
-
while still supporting the full power of Sass.
|
6
|
-
This means that every valid CSS3 stylesheet
|
7
|
-
is a valid SCSS file with the same meaning.
|
8
|
-
In addition, SCSS understands most CSS hacks
|
9
|
-
and vendor-specific syntax, such as [IE's old `filter` syntax](http://msdn.microsoft.com/en-us/library/ms533754%28VS.85%29.aspx).
|
10
|
-
|
11
|
-
Since SCSS is a CSS extension,
|
12
|
-
everything that works in CSS works in SCSS.
|
13
|
-
This means that for a Sass user to understand it,
|
14
|
-
they need only understand how the Sass extensions work.
|
15
|
-
Most of these, such as variables, parent references, and directives work the same;
|
16
|
-
the only difference is that SCSS requires semicolons
|
17
|
-
and brackets instead of newlines and indentation.
|
18
|
-
For example, a simple rule in Sass:
|
19
|
-
|
20
|
-
#sidebar
|
21
|
-
width: 30%
|
22
|
-
background-color: #faa
|
23
|
-
|
24
|
-
could be converted to SCSS just by adding brackets and semicolons:
|
25
|
-
|
26
|
-
#sidebar {
|
27
|
-
width: 30%;
|
28
|
-
background-color: #faa;
|
29
|
-
}
|
30
|
-
|
31
|
-
In addition, SCSS is completely whitespace-insensitive.
|
32
|
-
That means the above could also be written as:
|
33
|
-
|
34
|
-
#sidebar {width: 30%; background-color: #faa}
|
35
|
-
|
36
|
-
There are some differences that are slightly more complicated.
|
37
|
-
These are detailed below.
|
38
|
-
Note, though, that SCSS uses all the
|
39
|
-
{file:SASS_CHANGELOG.md#3-0-0-syntax-changes syntax changes in Sass 3},
|
40
|
-
so make sure you understand those before going forward.
|
41
|
-
|
42
|
-
## Nested Selectors
|
43
|
-
|
44
|
-
To nest selectors, simply define a new ruleset
|
45
|
-
inside an existing ruleset:
|
46
|
-
|
47
|
-
#sidebar {
|
48
|
-
a { text-decoration: none; }
|
49
|
-
}
|
50
|
-
|
51
|
-
Of course, white space is insignificant
|
52
|
-
and the last trailing semicolon is optional
|
53
|
-
so you can also do it like this:
|
54
|
-
|
55
|
-
#sidebar { a { text-decoration: none } }
|
56
|
-
|
57
|
-
## Nested Properties
|
58
|
-
|
59
|
-
To nest properties,
|
60
|
-
simply create a new property set
|
61
|
-
after an existing property's colon:
|
62
|
-
|
63
|
-
#footer {
|
64
|
-
border: {
|
65
|
-
width: 1px;
|
66
|
-
color: #ccc;
|
67
|
-
style: solid;
|
68
|
-
}
|
69
|
-
}
|
70
|
-
|
71
|
-
This compiles to:
|
72
|
-
|
73
|
-
#footer {
|
74
|
-
border-width: 1px;
|
75
|
-
border-color: #cccccc;
|
76
|
-
border-style: solid; }
|
77
|
-
|
78
|
-
## Mixins
|
79
|
-
|
80
|
-
A mixin is declared with the `@mixin` directive:
|
81
|
-
|
82
|
-
@mixin rounded($amount) {
|
83
|
-
-moz-border-radius: $amount;
|
84
|
-
-webkit-border-radius: $amount;
|
85
|
-
border-radius: $amount;
|
86
|
-
}
|
87
|
-
|
88
|
-
A mixin is used with the `@include` directive:
|
89
|
-
|
90
|
-
.box {
|
91
|
-
border: 3px solid #777;
|
92
|
-
@include rounded(0.5em);
|
93
|
-
}
|
94
|
-
|
95
|
-
This syntax is also available in the indented syntax,
|
96
|
-
although the old `=` and `+` syntax still works.
|
97
|
-
|
98
|
-
This is rather verbose compared to the `=` and `+` characters used in Sass syntax.
|
99
|
-
This is because the SCSS format is designed for CSS compatibility rather than conciseness,
|
100
|
-
and creating new syntax when the CSS directive syntax already exists
|
101
|
-
adds new syntax needlessly and
|
102
|
-
could create incompatibilities with future versions of CSS.
|
103
|
-
|
104
|
-
## Comments
|
105
|
-
|
106
|
-
Like Sass, SCSS supports both comments that are preserved in the CSS output
|
107
|
-
and comments that aren't.
|
108
|
-
However, SCSS's comments are significantly more flexible.
|
109
|
-
It supports standard multiline CSS comments with `/* */`,
|
110
|
-
which are preserved where possible in the output.
|
111
|
-
These comments can have whatever formatting you like;
|
112
|
-
Sass will do its best to format them nicely.
|
113
|
-
|
114
|
-
SCSS also uses `//` for comments that are thrown away, like Sass.
|
115
|
-
Unlike Sass, though, `//` comments in SCSS may appear anywhere
|
116
|
-
and last only until the end of the line.
|
117
|
-
|
118
|
-
For example:
|
119
|
-
|
120
|
-
/* This comment is
|
121
|
-
* several lines long.
|
122
|
-
* since it uses the CSS comment syntax,
|
123
|
-
* it will appear in the CSS output. */
|
124
|
-
body { color: black; }
|
125
|
-
|
126
|
-
// These comments are only one line long each.
|
127
|
-
// They won't appear in the CSS output,
|
128
|
-
// since they use the single-line comment syntax.
|
129
|
-
a { color: green; }
|
130
|
-
|
131
|
-
is compiled to:
|
132
|
-
|
133
|
-
/* This comment is
|
134
|
-
* several lines long.
|
135
|
-
* since it uses the CSS comment syntax,
|
136
|
-
* it will appear in the CSS output. */
|
137
|
-
body {
|
138
|
-
color: black; }
|
139
|
-
|
140
|
-
a {
|
141
|
-
color: green; }
|
142
|
-
|
143
|
-
## `@import`
|
144
|
-
|
145
|
-
The `@import` directive in SCSS functions just like that in Sass,
|
146
|
-
except that it takes a quoted string to import.
|
147
|
-
For example, this Sass:
|
148
|
-
|
149
|
-
@import themes/dark
|
150
|
-
@import font.sass
|
151
|
-
|
152
|
-
would be this SCSS:
|
153
|
-
|
154
|
-
@import "themes/dark";
|
155
|
-
@import "font.sass";
|
@@ -1,753 +0,0 @@
|
|
1
|
-
;;; haml-mode.el --- Major mode for editing Haml files
|
2
|
-
|
3
|
-
;; Copyright (c) 2007, 2008 Nathan Weizenbaum
|
4
|
-
|
5
|
-
;; Author: Nathan Weizenbaum
|
6
|
-
;; URL: http://github.com/nex3/haml/tree/master
|
7
|
-
;; Version: 3.0.19
|
8
|
-
;; Created: 2007-03-08
|
9
|
-
;; By: Nathan Weizenbaum
|
10
|
-
;; Keywords: markup, language, html
|
11
|
-
|
12
|
-
;;; Commentary:
|
13
|
-
|
14
|
-
;; Because Haml's indentation schema is similar
|
15
|
-
;; to that of YAML and Python, many indentation-related
|
16
|
-
;; functions are similar to those in yaml-mode and python-mode.
|
17
|
-
|
18
|
-
;; To install, save this on your load path and add the following to
|
19
|
-
;; your .emacs file:
|
20
|
-
;;
|
21
|
-
;; (require 'haml-mode)
|
22
|
-
|
23
|
-
;;; Code:
|
24
|
-
|
25
|
-
(eval-when-compile (require 'cl))
|
26
|
-
(require 'ruby-mode)
|
27
|
-
|
28
|
-
;; Additional (optional) libraries for fontification
|
29
|
-
(require 'css-mode nil t)
|
30
|
-
(require 'textile-mode nil t)
|
31
|
-
(require 'markdown-mode nil t)
|
32
|
-
(require 'javascript-mode "javascript" t)
|
33
|
-
(require 'js nil t)
|
34
|
-
|
35
|
-
|
36
|
-
;; User definable variables
|
37
|
-
|
38
|
-
(defgroup haml nil
|
39
|
-
"Support for the Haml template language."
|
40
|
-
:group 'languages
|
41
|
-
:prefix "haml-")
|
42
|
-
|
43
|
-
(defcustom haml-mode-hook nil
|
44
|
-
"Hook run when entering Haml mode."
|
45
|
-
:type 'hook
|
46
|
-
:group 'haml)
|
47
|
-
|
48
|
-
(defcustom haml-indent-offset 2
|
49
|
-
"Amount of offset per level of indentation."
|
50
|
-
:type 'integer
|
51
|
-
:group 'haml)
|
52
|
-
|
53
|
-
(defcustom haml-backspace-backdents-nesting t
|
54
|
-
"Non-nil to have `haml-electric-backspace' re-indent blocks of code.
|
55
|
-
This means that all code nested beneath the backspaced line is
|
56
|
-
re-indented along with the line itself."
|
57
|
-
:type 'boolean
|
58
|
-
:group 'haml)
|
59
|
-
|
60
|
-
(defvar haml-indent-function 'haml-indent-p
|
61
|
-
"A function for checking if nesting is allowed.
|
62
|
-
This function should look at the current line and return t
|
63
|
-
if the next line could be nested within this line.
|
64
|
-
|
65
|
-
The function can also return a positive integer to indicate
|
66
|
-
a specific level to which the current line could be indented.")
|
67
|
-
|
68
|
-
(defconst haml-tag-beg-re
|
69
|
-
"^[ \t]*\\(?:[%\\.#][a-z0-9_:\\-]*\\)+\\(?:(.*)\\|{.*}\\|\\[.*\\]\\)*"
|
70
|
-
"A regexp matching the beginning of a Haml tag, through (), {}, and [].")
|
71
|
-
|
72
|
-
(defvar haml-block-openers
|
73
|
-
`(,(concat haml-tag-beg-re "[><]*[ \t]*$")
|
74
|
-
"^[ \t]*[&!]?[-=~].*do[ \t]*\\(|.*|[ \t]*\\)?$"
|
75
|
-
,(concat "^[ \t]*[&!]?[-=~][ \t]*\\("
|
76
|
-
(regexp-opt '("if" "unless" "while" "until" "else" "for"
|
77
|
-
"begin" "elsif" "rescue" "ensure" "when"))
|
78
|
-
"\\)")
|
79
|
-
"^[ \t]*/\\(\\[.*\\]\\)?[ \t]*$"
|
80
|
-
"^[ \t]*-#"
|
81
|
-
"^[ \t]*:")
|
82
|
-
"A list of regexps that match lines of Haml that open blocks.
|
83
|
-
That is, a Haml line that can have text nested beneath it should
|
84
|
-
be matched by a regexp in this list.")
|
85
|
-
|
86
|
-
;; Font lock
|
87
|
-
|
88
|
-
(defun haml-nested-regexp (re)
|
89
|
-
"Create a regexp to match a block starting with RE.
|
90
|
-
The line containing RE is matched, as well as all lines indented beneath it."
|
91
|
-
(concat "^\\([ \t]*\\)" re "\\(\n\\(?:\\(?:\\1 .*\\| *\\)\n\\)*\\(?:\\1 .*\\| *\\)?\\)?"))
|
92
|
-
|
93
|
-
(defconst haml-font-lock-keywords
|
94
|
-
`((,(haml-nested-regexp "\\(?:-#\\|/\\).*") 0 font-lock-comment-face)
|
95
|
-
(,(haml-nested-regexp ":\\w+") 0 font-lock-string-face)
|
96
|
-
(haml-highlight-ruby-filter-block 1 font-lock-preprocessor-face)
|
97
|
-
(haml-highlight-css-filter-block 1 font-lock-preprocessor-face)
|
98
|
-
(haml-highlight-textile-filter-block 1 font-lock-preprocessor-face)
|
99
|
-
(haml-highlight-markdown-filter-block 1 font-lock-preprocessor-face)
|
100
|
-
(haml-highlight-js-filter-block 1 font-lock-preprocessor-face)
|
101
|
-
(haml-highlight-interpolation 1 font-lock-variable-name-face prepend)
|
102
|
-
(haml-highlight-ruby-tag 1 font-lock-preprocessor-face)
|
103
|
-
(haml-highlight-ruby-script 1 font-lock-preprocessor-face)
|
104
|
-
("^!!!.*" 0 font-lock-constant-face)
|
105
|
-
("| *$" 0 font-lock-string-face)))
|
106
|
-
|
107
|
-
(defconst haml-filter-re "^[ \t]*:\\w+")
|
108
|
-
(defconst haml-comment-re "^[ \t]*\\(?:-\\#\\|/\\)")
|
109
|
-
|
110
|
-
(defun haml-fontify-region (beg end keywords syntax-table syntactic-keywords)
|
111
|
-
"Fontify a region between BEG and END using another mode's fontification.
|
112
|
-
|
113
|
-
KEYWORDS, SYNTAX-TABLE, and SYNTACTIC-KEYWORDS are the values of that mode's
|
114
|
-
`font-lock-keywords', `font-lock-syntax-table',
|
115
|
-
and `font-lock-syntactic-keywords', respectively."
|
116
|
-
(save-excursion
|
117
|
-
(save-match-data
|
118
|
-
(let ((font-lock-keywords keywords)
|
119
|
-
(font-lock-syntax-table syntax-table)
|
120
|
-
(font-lock-syntactic-keywords syntactic-keywords)
|
121
|
-
(font-lock-multiline 'undecided)
|
122
|
-
font-lock-keywords-only
|
123
|
-
font-lock-extend-region-functions
|
124
|
-
font-lock-keywords-case-fold-search)
|
125
|
-
;; font-lock-fontify-region apparently isn't inclusive,
|
126
|
-
;; so we have to move the beginning back one char
|
127
|
-
(font-lock-fontify-region (- beg 1) end)))))
|
128
|
-
|
129
|
-
(defun haml-fontify-region-as-ruby (beg end)
|
130
|
-
"Use Ruby's font-lock variables to fontify the region between BEG and END."
|
131
|
-
(haml-fontify-region beg end ruby-font-lock-keywords
|
132
|
-
ruby-font-lock-syntax-table
|
133
|
-
ruby-font-lock-syntactic-keywords))
|
134
|
-
|
135
|
-
(defun haml-handle-filter (filter-name limit fn)
|
136
|
-
"If a FILTER-NAME filter is found within LIMIT, run FN on that filter.
|
137
|
-
|
138
|
-
FN is passed a pair of points representing the beginning and end
|
139
|
-
of the filtered text."
|
140
|
-
(when (re-search-forward (haml-nested-regexp (concat ":" filter-name)) limit t)
|
141
|
-
(funcall fn (+ 2 (match-beginning 2)) (match-end 2))))
|
142
|
-
|
143
|
-
(defun haml-fontify-filter-region (filter-name limit &rest fontify-region-args)
|
144
|
-
"If a FILTER-NAME filter is found within LIMIT, fontify it.
|
145
|
-
|
146
|
-
The fontification is done by passing FONTIFY-REGION-ARGS to
|
147
|
-
`haml-fontify-region'."
|
148
|
-
(haml-handle-filter filter-name limit
|
149
|
-
(lambda (beg end)
|
150
|
-
(apply 'haml-fontify-region
|
151
|
-
(append (list beg end)
|
152
|
-
fontify-region-args)))))
|
153
|
-
|
154
|
-
(defun haml-highlight-ruby-filter-block (limit)
|
155
|
-
"If a :ruby filter is found within LIMIT, highlight it."
|
156
|
-
(haml-handle-filter "ruby" limit 'haml-fontify-region-as-ruby))
|
157
|
-
|
158
|
-
(defun haml-highlight-css-filter-block (limit)
|
159
|
-
"If a :css filter is found within LIMIT, highlight it.
|
160
|
-
|
161
|
-
This requires that `css-mode' is available.
|
162
|
-
`css-mode' is included with Emacs 23."
|
163
|
-
(if (boundp 'css-font-lock-keywords)
|
164
|
-
(haml-fontify-filter-region "css" limit css-font-lock-keywords nil nil)))
|
165
|
-
|
166
|
-
(defun haml-highlight-js-filter-block (limit)
|
167
|
-
"If a :javascript filter is found within LIMIT, highlight it.
|
168
|
-
|
169
|
-
This requires that Karl Landström's javascript mode be available, either as the
|
170
|
-
\"js.el\" bundled with Emacs 23, or as \"javascript.el\" found in ELPA and
|
171
|
-
elsewhere."
|
172
|
-
(let ((keywords (or (and (featurep 'js) js--font-lock-keywords-3)
|
173
|
-
(and (featurep 'javascript-mode) js-font-lock-keywords-3)))
|
174
|
-
(syntax-table (or (and (featurep 'js) js-mode-syntax-table)
|
175
|
-
(and (featurep 'javascript-mode) javascript-mode-syntax-table))))
|
176
|
-
(when keywords
|
177
|
-
(haml-fontify-filter-region "javascript" limit keywords syntax-table nil))))
|
178
|
-
|
179
|
-
(defun haml-highlight-textile-filter-block (limit)
|
180
|
-
"If a :textile filter is found within LIMIT, highlight it.
|
181
|
-
|
182
|
-
This requires that `textile-mode' be available.
|
183
|
-
|
184
|
-
Note that the results are not perfect, since `textile-mode' expects
|
185
|
-
certain constructs such as \"h1.\" to be at the beginning of a line,
|
186
|
-
and indented Haml filters always have leading whitespace."
|
187
|
-
(if (boundp 'textile-font-lock-keywords)
|
188
|
-
(haml-fontify-filter-region "textile" limit textile-font-lock-keywords nil nil)))
|
189
|
-
|
190
|
-
(defun haml-highlight-markdown-filter-block (limit)
|
191
|
-
"If a :markdown filter is found within LIMIT, highlight it.
|
192
|
-
|
193
|
-
This requires that `markdown-mode' be available."
|
194
|
-
(if (boundp 'markdown-mode-font-lock-keywords)
|
195
|
-
(haml-fontify-filter-region "markdown" limit
|
196
|
-
markdown-mode-font-lock-keywords
|
197
|
-
markdown-mode-syntax-table
|
198
|
-
nil)))
|
199
|
-
|
200
|
-
(defun haml-highlight-ruby-script (limit)
|
201
|
-
"Highlight a Ruby script expression (-, =, or ~).
|
202
|
-
LIMIT works as it does in `re-search-forward'."
|
203
|
-
(when (re-search-forward "^[ \t]*\\(-\\|[&!]?[=~]\\) \\(.*\\)$" limit t)
|
204
|
-
(haml-fontify-region-as-ruby (match-beginning 2) (match-end 2))))
|
205
|
-
|
206
|
-
(defun haml-highlight-ruby-tag (limit)
|
207
|
-
"Highlight Ruby code within a Haml tag.
|
208
|
-
LIMIT works as it does in `re-search-forward'.
|
209
|
-
|
210
|
-
This highlights the tag attributes and object refs of the tag,
|
211
|
-
as well as the script expression (-, =, or ~) following the tag.
|
212
|
-
|
213
|
-
For example, this will highlight all of the following:
|
214
|
-
%p{:foo => 'bar'}
|
215
|
-
%p[@bar]
|
216
|
-
%p= 'baz'
|
217
|
-
%p{:foo => 'bar'}[@bar]= 'baz'"
|
218
|
-
(when (re-search-forward "^[ \t]*[%.#]" limit t)
|
219
|
-
(forward-char -1)
|
220
|
-
|
221
|
-
;; Highlight tag, classes, and ids
|
222
|
-
(while (haml-move "\\([.#%]\\)[a-z0-9_:\\-]*")
|
223
|
-
(put-text-property (match-beginning 0) (match-end 0) 'face
|
224
|
-
(case (char-after (match-beginning 1))
|
225
|
-
(?% font-lock-function-name-face)
|
226
|
-
(?# font-lock-keyword-face)
|
227
|
-
(?. font-lock-type-face))))
|
228
|
-
|
229
|
-
(block loop
|
230
|
-
(while t
|
231
|
-
(let ((eol (save-excursion (end-of-line) (point))))
|
232
|
-
(case (char-after)
|
233
|
-
;; Highlight obj refs
|
234
|
-
(?\[
|
235
|
-
(let ((beg (point)))
|
236
|
-
(haml-limited-forward-sexp eol)
|
237
|
-
(haml-fontify-region-as-ruby beg (point))))
|
238
|
-
;; Highlight new attr hashes
|
239
|
-
(?\(
|
240
|
-
(forward-char 1)
|
241
|
-
(while
|
242
|
-
(and (haml-parse-new-attr-hash
|
243
|
-
(lambda (type beg end)
|
244
|
-
(case type
|
245
|
-
(name (put-text-property beg end 'face font-lock-constant-face))
|
246
|
-
(value (haml-fontify-region-as-ruby beg end)))))
|
247
|
-
(not (eobp)))
|
248
|
-
(forward-line 1)
|
249
|
-
(beginning-of-line)))
|
250
|
-
;; Highlight old attr hashes
|
251
|
-
(?\{
|
252
|
-
(let ((beg (point)))
|
253
|
-
(haml-limited-forward-sexp eol)
|
254
|
-
|
255
|
-
;; Check for multiline
|
256
|
-
(while (and (eolp) (eq (char-before) ?,) (not (eobp)))
|
257
|
-
(forward-line)
|
258
|
-
(let ((eol (save-excursion (end-of-line) (point))))
|
259
|
-
;; If no sexps are closed,
|
260
|
-
;; we're still continuing a multiline hash
|
261
|
-
(if (>= (car (parse-partial-sexp (point) eol)) 0)
|
262
|
-
(end-of-line)
|
263
|
-
;; If sexps have been closed,
|
264
|
-
;; set the point at the end of the total sexp
|
265
|
-
(goto-char beg)
|
266
|
-
(haml-limited-forward-sexp eol))))
|
267
|
-
|
268
|
-
(haml-fontify-region-as-ruby (+ 1 beg) (point))))
|
269
|
-
(t (return-from loop))))))
|
270
|
-
|
271
|
-
;; Move past end chars
|
272
|
-
(when (looking-at "[<>&!]+") (goto-char (match-end 0)))
|
273
|
-
;; Highlight script
|
274
|
-
(if (looking-at "\\([=~]\\) \\(.*\\)$")
|
275
|
-
(haml-fontify-region-as-ruby (match-beginning 2) (match-end 2))
|
276
|
-
;; Give font-lock something to highlight
|
277
|
-
(forward-char -1)
|
278
|
-
(looking-at "\\(\\)"))
|
279
|
-
t))
|
280
|
-
|
281
|
-
(defun haml-move (re)
|
282
|
-
"Try matching and moving to the end of regular expression RE.
|
283
|
-
Returns non-nil if the expression was sucessfully matched."
|
284
|
-
(when (looking-at re)
|
285
|
-
(goto-char (match-end 0))
|
286
|
-
t))
|
287
|
-
|
288
|
-
(defun haml-highlight-interpolation (limit)
|
289
|
-
"Highlight Ruby interpolation (#{foo}).
|
290
|
-
LIMIT works as it does in `re-search-forward'."
|
291
|
-
(when (re-search-forward "\\(#{\\)" limit t)
|
292
|
-
(save-match-data
|
293
|
-
(forward-char -1)
|
294
|
-
(let ((beg (point)))
|
295
|
-
(haml-limited-forward-sexp limit)
|
296
|
-
(haml-fontify-region-as-ruby (+ 1 beg) (point)))
|
297
|
-
|
298
|
-
(when (eq (char-before) ?})
|
299
|
-
(put-text-property (- (point) 1) (point)
|
300
|
-
'face font-lock-variable-name-face))
|
301
|
-
t)))
|
302
|
-
|
303
|
-
(defun haml-limited-forward-sexp (limit &optional arg)
|
304
|
-
"Move forward using `forward-sexp' or to LIMIT, whichever comes first.
|
305
|
-
With ARG, do it that many times."
|
306
|
-
(let (forward-sexp-function)
|
307
|
-
(condition-case err
|
308
|
-
(save-restriction
|
309
|
-
(narrow-to-region (point) limit)
|
310
|
-
(forward-sexp arg))
|
311
|
-
(scan-error
|
312
|
-
(unless (equal (nth 1 err) "Unbalanced parentheses")
|
313
|
-
(signal 'scan-error (cdr err)))
|
314
|
-
(goto-char limit)))))
|
315
|
-
|
316
|
-
(defun* haml-extend-region-filters-comments ()
|
317
|
-
"Extend the font-lock region to encompass filters and comments."
|
318
|
-
(let ((old-beg font-lock-beg)
|
319
|
-
(old-end font-lock-end))
|
320
|
-
(save-excursion
|
321
|
-
(goto-char font-lock-beg)
|
322
|
-
(beginning-of-line)
|
323
|
-
(unless (or (looking-at haml-filter-re)
|
324
|
-
(looking-at haml-comment-re))
|
325
|
-
(return-from haml-extend-region-filters-comments))
|
326
|
-
(setq font-lock-beg (point))
|
327
|
-
(haml-forward-sexp)
|
328
|
-
(beginning-of-line)
|
329
|
-
(setq font-lock-end (max font-lock-end (point))))
|
330
|
-
(or (/= old-beg font-lock-beg)
|
331
|
-
(/= old-end font-lock-end))))
|
332
|
-
|
333
|
-
(defun* haml-extend-region-multiline-hashes ()
|
334
|
-
"Extend the font-lock region to encompass multiline attribute hashes."
|
335
|
-
(let ((old-beg font-lock-beg)
|
336
|
-
(old-end font-lock-end))
|
337
|
-
(save-excursion
|
338
|
-
(goto-char font-lock-beg)
|
339
|
-
(let ((attr-props (haml-parse-multiline-attr-hash))
|
340
|
-
multiline-end)
|
341
|
-
(when attr-props
|
342
|
-
(setq font-lock-beg (cdr (assq 'point attr-props)))
|
343
|
-
|
344
|
-
(end-of-line)
|
345
|
-
;; Move through multiline attrs
|
346
|
-
(when (eq (char-before) ?,)
|
347
|
-
(save-excursion
|
348
|
-
(while (progn (end-of-line)
|
349
|
-
(and (eq (char-before) ?,) (not (eobp))))
|
350
|
-
(forward-line))
|
351
|
-
|
352
|
-
(forward-line -1)
|
353
|
-
(end-of-line)
|
354
|
-
(setq multiline-end (point))))
|
355
|
-
|
356
|
-
(goto-char (+ (cdr (assq 'point attr-props))
|
357
|
-
(cdr (assq 'hash-indent attr-props))
|
358
|
-
-1))
|
359
|
-
(haml-limited-forward-sexp
|
360
|
-
(or multiline-end
|
361
|
-
(save-excursion (end-of-line) (point))))
|
362
|
-
(setq font-lock-end (max font-lock-end (point))))))
|
363
|
-
(or (/= old-beg font-lock-beg)
|
364
|
-
(/= old-end font-lock-end))))
|
365
|
-
|
366
|
-
|
367
|
-
;; Mode setup
|
368
|
-
|
369
|
-
(defvar haml-mode-syntax-table
|
370
|
-
(let ((table (make-syntax-table)))
|
371
|
-
(modify-syntax-entry ?: "." table)
|
372
|
-
(modify-syntax-entry ?_ "w" table)
|
373
|
-
table)
|
374
|
-
"Syntax table in use in `haml-mode' buffers.")
|
375
|
-
|
376
|
-
(defvar haml-mode-map
|
377
|
-
(let ((map (make-sparse-keymap)))
|
378
|
-
(define-key map [backspace] 'haml-electric-backspace)
|
379
|
-
(define-key map "\C-?" 'haml-electric-backspace)
|
380
|
-
(define-key map "\C-c\C-f" 'haml-forward-sexp)
|
381
|
-
(define-key map "\C-c\C-b" 'haml-backward-sexp)
|
382
|
-
(define-key map "\C-c\C-u" 'haml-up-list)
|
383
|
-
(define-key map "\C-c\C-d" 'haml-down-list)
|
384
|
-
(define-key map "\C-c\C-k" 'haml-kill-line-and-indent)
|
385
|
-
(define-key map "\C-c\C-r" 'haml-output-region)
|
386
|
-
(define-key map "\C-c\C-l" 'haml-output-buffer)
|
387
|
-
map))
|
388
|
-
|
389
|
-
;;;###autoload
|
390
|
-
(define-derived-mode haml-mode fundamental-mode "Haml"
|
391
|
-
"Major mode for editing Haml files.
|
392
|
-
|
393
|
-
\\{haml-mode-map}"
|
394
|
-
(set-syntax-table haml-mode-syntax-table)
|
395
|
-
(add-to-list 'font-lock-extend-region-functions 'haml-extend-region-filters-comments)
|
396
|
-
(add-to-list 'font-lock-extend-region-functions 'haml-extend-region-multiline-hashes)
|
397
|
-
(set (make-local-variable 'font-lock-multiline) t)
|
398
|
-
(set (make-local-variable 'indent-line-function) 'haml-indent-line)
|
399
|
-
(set (make-local-variable 'indent-region-function) 'haml-indent-region)
|
400
|
-
(set (make-local-variable 'parse-sexp-lookup-properties) t)
|
401
|
-
(setq comment-start "-#")
|
402
|
-
(setq font-lock-defaults '((haml-font-lock-keywords) t t)))
|
403
|
-
|
404
|
-
;; Useful functions
|
405
|
-
|
406
|
-
(defun haml-comment-block ()
|
407
|
-
"Comment the current block of Haml code."
|
408
|
-
(interactive)
|
409
|
-
(save-excursion
|
410
|
-
(let ((indent (current-indentation)))
|
411
|
-
(back-to-indentation)
|
412
|
-
(insert "-#")
|
413
|
-
(newline)
|
414
|
-
(indent-to indent)
|
415
|
-
(beginning-of-line)
|
416
|
-
(haml-mark-sexp)
|
417
|
-
(haml-reindent-region-by haml-indent-offset))))
|
418
|
-
|
419
|
-
(defun haml-uncomment-block ()
|
420
|
-
"Uncomment the current block of Haml code."
|
421
|
-
(interactive)
|
422
|
-
(save-excursion
|
423
|
-
(beginning-of-line)
|
424
|
-
(while (not (looking-at haml-comment-re))
|
425
|
-
(haml-up-list)
|
426
|
-
(beginning-of-line))
|
427
|
-
(haml-mark-sexp)
|
428
|
-
(kill-line 1)
|
429
|
-
(haml-reindent-region-by (- haml-indent-offset))))
|
430
|
-
|
431
|
-
(defun haml-replace-region (start end)
|
432
|
-
"Replace the current block of Haml code with the HTML equivalent.
|
433
|
-
Called from a program, START and END specify the region to indent."
|
434
|
-
(interactive "r")
|
435
|
-
(save-excursion
|
436
|
-
(goto-char end)
|
437
|
-
(setq end (point-marker))
|
438
|
-
(goto-char start)
|
439
|
-
(let ((ci (current-indentation)))
|
440
|
-
(while (re-search-forward "^ +" end t)
|
441
|
-
(replace-match (make-string (- (current-indentation) ci) ? ))))
|
442
|
-
(shell-command-on-region start end "haml" "haml-output" t)))
|
443
|
-
|
444
|
-
(defun haml-output-region (start end)
|
445
|
-
"Displays the HTML output for the current block of Haml code.
|
446
|
-
Called from a program, START and END specify the region to indent."
|
447
|
-
(interactive "r")
|
448
|
-
(kill-new (buffer-substring start end))
|
449
|
-
(with-temp-buffer
|
450
|
-
(yank)
|
451
|
-
(haml-indent-region (point-min) (point-max))
|
452
|
-
(shell-command-on-region (point-min) (point-max) "haml" "haml-output")))
|
453
|
-
|
454
|
-
(defun haml-output-buffer ()
|
455
|
-
"Displays the HTML output for entire buffer."
|
456
|
-
(interactive)
|
457
|
-
(haml-output-region (point-min) (point-max)))
|
458
|
-
|
459
|
-
;; Navigation
|
460
|
-
|
461
|
-
(defun haml-forward-through-whitespace (&optional backward)
|
462
|
-
"Move the point forward through any whitespace.
|
463
|
-
The point will move forward at least one line, until it reaches
|
464
|
-
either the end of the buffer or a line with no whitespace.
|
465
|
-
|
466
|
-
If BACKWARD is non-nil, move the point backward instead."
|
467
|
-
(let ((arg (if backward -1 1))
|
468
|
-
(endp (if backward 'bobp 'eobp)))
|
469
|
-
(loop do (forward-line arg)
|
470
|
-
while (and (not (funcall endp))
|
471
|
-
(looking-at "^[ \t]*$")))))
|
472
|
-
|
473
|
-
(defun haml-at-indent-p ()
|
474
|
-
"Return non-nil if the point is before any text on the line."
|
475
|
-
(let ((opoint (point)))
|
476
|
-
(save-excursion
|
477
|
-
(back-to-indentation)
|
478
|
-
(>= (point) opoint))))
|
479
|
-
|
480
|
-
(defun haml-forward-sexp (&optional arg)
|
481
|
-
"Move forward across one nested expression.
|
482
|
-
With ARG, do it that many times. Negative arg -N means move
|
483
|
-
backward across N balanced expressions.
|
484
|
-
|
485
|
-
A sexp in Haml is defined as a line of Haml code as well as any
|
486
|
-
lines nested beneath it."
|
487
|
-
(interactive "p")
|
488
|
-
(or arg (setq arg 1))
|
489
|
-
(if (and (< arg 0) (not (haml-at-indent-p)))
|
490
|
-
(back-to-indentation)
|
491
|
-
(while (/= arg 0)
|
492
|
-
(let ((indent (current-indentation)))
|
493
|
-
(loop do (haml-forward-through-whitespace (< arg 0))
|
494
|
-
while (and (not (eobp))
|
495
|
-
(not (bobp))
|
496
|
-
(> (current-indentation) indent)))
|
497
|
-
(back-to-indentation)
|
498
|
-
(setq arg (+ arg (if (> arg 0) -1 1)))))))
|
499
|
-
|
500
|
-
(defun haml-backward-sexp (&optional arg)
|
501
|
-
"Move backward across one nested expression.
|
502
|
-
With ARG, do it that many times. Negative arg -N means move
|
503
|
-
forward across N balanced expressions.
|
504
|
-
|
505
|
-
A sexp in Haml is defined as a line of Haml code as well as any
|
506
|
-
lines nested beneath it."
|
507
|
-
(interactive "p")
|
508
|
-
(haml-forward-sexp (if arg (- arg) -1)))
|
509
|
-
|
510
|
-
(defun haml-up-list (&optional arg)
|
511
|
-
"Move out of one level of nesting.
|
512
|
-
With ARG, do this that many times."
|
513
|
-
(interactive "p")
|
514
|
-
(or arg (setq arg 1))
|
515
|
-
(while (> arg 0)
|
516
|
-
(let ((indent (current-indentation)))
|
517
|
-
(loop do (haml-forward-through-whitespace t)
|
518
|
-
while (and (not (bobp))
|
519
|
-
(>= (current-indentation) indent)))
|
520
|
-
(setq arg (- arg 1))))
|
521
|
-
(back-to-indentation))
|
522
|
-
|
523
|
-
(defun haml-down-list (&optional arg)
|
524
|
-
"Move down one level of nesting.
|
525
|
-
With ARG, do this that many times."
|
526
|
-
(interactive "p")
|
527
|
-
(or arg (setq arg 1))
|
528
|
-
(while (> arg 0)
|
529
|
-
(let ((indent (current-indentation)))
|
530
|
-
(haml-forward-through-whitespace)
|
531
|
-
(when (<= (current-indentation) indent)
|
532
|
-
(haml-forward-through-whitespace t)
|
533
|
-
(back-to-indentation)
|
534
|
-
(error "Nothing is nested beneath this line"))
|
535
|
-
(setq arg (- arg 1))))
|
536
|
-
(back-to-indentation))
|
537
|
-
|
538
|
-
(defun haml-mark-sexp ()
|
539
|
-
"Mark the next Haml block."
|
540
|
-
(let ((forward-sexp-function 'haml-forward-sexp))
|
541
|
-
(mark-sexp)))
|
542
|
-
|
543
|
-
(defun haml-mark-sexp-but-not-next-line ()
|
544
|
-
"Mark the next Haml block, but not the next line.
|
545
|
-
Put the mark at the end of the last line of the sexp rather than
|
546
|
-
the first non-whitespace character of the next line."
|
547
|
-
(haml-mark-sexp)
|
548
|
-
(set-mark
|
549
|
-
(save-excursion
|
550
|
-
(goto-char (mark))
|
551
|
-
(forward-line -1)
|
552
|
-
(end-of-line)
|
553
|
-
(point))))
|
554
|
-
|
555
|
-
;; Indentation and electric keys
|
556
|
-
|
557
|
-
(defun* haml-indent-p ()
|
558
|
-
"Returns t if the current line can have lines nested beneath it."
|
559
|
-
(let ((attr-props (haml-parse-multiline-attr-hash)))
|
560
|
-
(when attr-props
|
561
|
-
(return-from haml-indent-p
|
562
|
-
(if (haml-unclosed-attr-hash-p) (cdr (assq 'hash-indent attr-props))
|
563
|
-
(list (+ (cdr (assq 'indent attr-props)) haml-indent-offset) nil)))))
|
564
|
-
(loop for opener in haml-block-openers
|
565
|
-
if (looking-at opener) return t
|
566
|
-
finally return nil))
|
567
|
-
|
568
|
-
(defun* haml-parse-multiline-attr-hash ()
|
569
|
-
"Parses a multiline attribute hash, and returns
|
570
|
-
an alist with the following keys:
|
571
|
-
|
572
|
-
INDENT is the indentation of the line beginning the hash.
|
573
|
-
|
574
|
-
HASH-INDENT is the indentation of the first character
|
575
|
-
within the attribute hash.
|
576
|
-
|
577
|
-
POINT is the character position at the beginning of the line
|
578
|
-
beginning the hash."
|
579
|
-
(save-excursion
|
580
|
-
(while t
|
581
|
-
(beginning-of-line)
|
582
|
-
(if (looking-at (concat haml-tag-beg-re "\\([{(]\\)"))
|
583
|
-
(progn
|
584
|
-
(goto-char (- (match-end 0) 1))
|
585
|
-
(haml-limited-forward-sexp (save-excursion (end-of-line) (point)))
|
586
|
-
(return-from haml-parse-multiline-attr-hash
|
587
|
-
(when (or (string-equal (match-string 1) "(") (eq (char-before) ?,))
|
588
|
-
`((indent . ,(current-indentation))
|
589
|
-
(hash-indent . ,(- (match-end 0) (match-beginning 0)))
|
590
|
-
(point . ,(match-beginning 0))))))
|
591
|
-
(when (bobp) (return-from haml-parse-multiline-attr-hash))
|
592
|
-
(forward-line -1)
|
593
|
-
(unless (haml-unclosed-attr-hash-p)
|
594
|
-
(return-from haml-parse-multiline-attr-hash))))))
|
595
|
-
|
596
|
-
(defun* haml-unclosed-attr-hash-p ()
|
597
|
-
"Return t if this line has an unclosed attribute hash, new or old."
|
598
|
-
(save-excursion
|
599
|
-
(end-of-line)
|
600
|
-
(when (eq (char-before) ?,) (return-from haml-unclosed-attr-hash-p t))
|
601
|
-
(re-search-backward "(\\|^")
|
602
|
-
(haml-move "(")
|
603
|
-
(haml-parse-new-attr-hash)))
|
604
|
-
|
605
|
-
(defun* haml-parse-new-attr-hash (&optional (fn (lambda (type beg end) ())))
|
606
|
-
"Parse a new-style attribute hash on this line, and returns
|
607
|
-
t if it's not finished on the current line.
|
608
|
-
|
609
|
-
FN should take three parameters: TYPE, BEG, and END.
|
610
|
-
TYPE is the type of text parsed ('name or 'value)
|
611
|
-
and BEG and END delimit that text in the buffer."
|
612
|
-
(let ((eol (save-excursion (end-of-line) (point))))
|
613
|
-
(while (not (haml-move ")"))
|
614
|
-
(haml-move "[ \t]*")
|
615
|
-
(unless (haml-move "[a-z0-9_:\\-]+")
|
616
|
-
(return-from haml-parse-new-attr-hash (haml-move "[ \t]*$")))
|
617
|
-
(funcall fn 'name (match-beginning 0) (match-end 0))
|
618
|
-
(haml-move "[ \t]*")
|
619
|
-
(when (haml-move "=")
|
620
|
-
(haml-move "[ \t]*")
|
621
|
-
(unless (looking-at "[\"'@a-z]") (return-from haml-parse-new-attr-hash))
|
622
|
-
(let ((beg (point)))
|
623
|
-
(haml-limited-forward-sexp eol)
|
624
|
-
(funcall fn 'value beg (point)))
|
625
|
-
(haml-move "[ \t]*")))
|
626
|
-
nil))
|
627
|
-
|
628
|
-
(defun haml-compute-indentation ()
|
629
|
-
"Calculate the maximum sensible indentation for the current line."
|
630
|
-
(save-excursion
|
631
|
-
(beginning-of-line)
|
632
|
-
(if (bobp) (list 0 nil)
|
633
|
-
(haml-forward-through-whitespace t)
|
634
|
-
(let ((indent (funcall haml-indent-function)))
|
635
|
-
(cond
|
636
|
-
((consp indent) indent)
|
637
|
-
((integerp indent) (list indent t))
|
638
|
-
(indent (list (+ (current-indentation) haml-indent-offset) nil))
|
639
|
-
(t (list (current-indentation) nil)))))))
|
640
|
-
|
641
|
-
(defun haml-indent-region (start end)
|
642
|
-
"Indent each nonblank line in the region.
|
643
|
-
This is done by indenting the first line based on
|
644
|
-
`haml-compute-indentation' and preserving the relative
|
645
|
-
indentation of the rest of the region. START and END specify the
|
646
|
-
region to indent.
|
647
|
-
|
648
|
-
If this command is used multiple times in a row, it will cycle
|
649
|
-
between possible indentations."
|
650
|
-
(save-excursion
|
651
|
-
(goto-char end)
|
652
|
-
(setq end (point-marker))
|
653
|
-
(goto-char start)
|
654
|
-
(let (this-line-column current-column
|
655
|
-
(next-line-column
|
656
|
-
(if (and (equal last-command this-command) (/= (current-indentation) 0))
|
657
|
-
(* (/ (- (current-indentation) 1) haml-indent-offset) haml-indent-offset)
|
658
|
-
(car (haml-compute-indentation)))))
|
659
|
-
(while (< (point) end)
|
660
|
-
(setq this-line-column next-line-column
|
661
|
-
current-column (current-indentation))
|
662
|
-
;; Delete whitespace chars at beginning of line
|
663
|
-
(delete-horizontal-space)
|
664
|
-
(unless (eolp)
|
665
|
-
(setq next-line-column (save-excursion
|
666
|
-
(loop do (forward-line 1)
|
667
|
-
while (and (not (eobp)) (looking-at "^[ \t]*$")))
|
668
|
-
(+ this-line-column
|
669
|
-
(- (current-indentation) current-column))))
|
670
|
-
;; Don't indent an empty line
|
671
|
-
(unless (eolp) (indent-to this-line-column)))
|
672
|
-
(forward-line 1)))
|
673
|
-
(move-marker end nil)))
|
674
|
-
|
675
|
-
(defun haml-indent-line ()
|
676
|
-
"Indent the current line.
|
677
|
-
The first time this command is used, the line will be indented to the
|
678
|
-
maximum sensible indentation. Each immediately subsequent usage will
|
679
|
-
back-dent the line by `haml-indent-offset' spaces. On reaching column
|
680
|
-
0, it will cycle back to the maximum sensible indentation."
|
681
|
-
(interactive "*")
|
682
|
-
(let ((ci (current-indentation))
|
683
|
-
(cc (current-column)))
|
684
|
-
(destructuring-bind (need strict) (haml-compute-indentation)
|
685
|
-
(save-excursion
|
686
|
-
(beginning-of-line)
|
687
|
-
(delete-horizontal-space)
|
688
|
-
(if (and (not strict) (equal last-command this-command) (/= ci 0))
|
689
|
-
(indent-to (* (/ (- ci 1) haml-indent-offset) haml-indent-offset))
|
690
|
-
(indent-to need))))
|
691
|
-
(when (< (current-column) (current-indentation))
|
692
|
-
(forward-to-indentation 0))))
|
693
|
-
|
694
|
-
(defun haml-reindent-region-by (n)
|
695
|
-
"Add N spaces to the beginning of each line in the region.
|
696
|
-
If N is negative, will remove the spaces instead. Assumes all
|
697
|
-
lines in the region have indentation >= that of the first line."
|
698
|
-
(let* ((ci (current-indentation))
|
699
|
-
(indent-rx
|
700
|
-
(concat "^"
|
701
|
-
(if indent-tabs-mode
|
702
|
-
(concat (make-string (/ ci tab-width) ?\t)
|
703
|
-
(make-string (mod ci tab-width) ?\t))
|
704
|
-
(make-string ci ?\s)))))
|
705
|
-
(save-excursion
|
706
|
-
(while (re-search-forward indent-rx (mark) t)
|
707
|
-
(let ((ci (current-indentation)))
|
708
|
-
(delete-horizontal-space)
|
709
|
-
(beginning-of-line)
|
710
|
-
(indent-to (max 0 (+ ci n))))))))
|
711
|
-
|
712
|
-
(defun haml-electric-backspace (arg)
|
713
|
-
"Delete characters or back-dent the current line.
|
714
|
-
If invoked following only whitespace on a line, will back-dent
|
715
|
-
the line and all nested lines to the immediately previous
|
716
|
-
multiple of `haml-indent-offset' spaces. With ARG, do it that
|
717
|
-
many times.
|
718
|
-
|
719
|
-
Set `haml-backspace-backdents-nesting' to nil to just back-dent
|
720
|
-
the current line."
|
721
|
-
(interactive "*p")
|
722
|
-
(if (or (/= (current-indentation) (current-column))
|
723
|
-
(bolp)
|
724
|
-
(looking-at "^[ \t]+$"))
|
725
|
-
(backward-delete-char arg)
|
726
|
-
(save-excursion
|
727
|
-
(let ((ci (current-column)))
|
728
|
-
(beginning-of-line)
|
729
|
-
(if haml-backspace-backdents-nesting
|
730
|
-
(haml-mark-sexp-but-not-next-line)
|
731
|
-
(set-mark (save-excursion (end-of-line) (point))))
|
732
|
-
(haml-reindent-region-by (* (- arg) haml-indent-offset))
|
733
|
-
(pop-mark)))
|
734
|
-
(back-to-indentation)))
|
735
|
-
|
736
|
-
(defun haml-kill-line-and-indent ()
|
737
|
-
"Kill the current line, and re-indent all lines nested beneath it."
|
738
|
-
(interactive)
|
739
|
-
(beginning-of-line)
|
740
|
-
(haml-mark-sexp-but-not-next-line)
|
741
|
-
(kill-line 1)
|
742
|
-
(haml-reindent-region-by (* -1 haml-indent-offset)))
|
743
|
-
|
744
|
-
(defun haml-indent-string ()
|
745
|
-
"Return the indentation string for `haml-indent-offset'."
|
746
|
-
(mapconcat 'identity (make-list haml-indent-offset " ") ""))
|
747
|
-
|
748
|
-
;;;###autoload
|
749
|
-
(add-to-list 'auto-mode-alist '("\\.haml$" . haml-mode))
|
750
|
-
|
751
|
-
;; Setup/Activation
|
752
|
-
(provide 'haml-mode)
|
753
|
-
;;; haml-mode.el ends here
|