diff --git a/middleman-core/features/front-matter.feature b/middleman-core/features/front-matter.feature index 1775bc36..df5e9b5e 100644 --- a/middleman-core/features/front-matter.feature +++ b/middleman-core/features/front-matter.feature @@ -18,6 +18,17 @@ Feature: YAML Front Matter Then I should see "This is a document" + Then I should see "

To be or not to be

" + Then I should see "The meaning of life is 42" + Then I should not see "..." + Then I should not see "layout: false" + Then I should not see "title: Pandoc likes trailing dots..." + + Scenario: YAML not on first line, no encoding Given the Server is running at "frontmatter-app" When I go to "/front-matter-line-2.html" diff --git a/middleman-core/features/slim.feature b/middleman-core/features/slim.feature index 32c4a344..2cdabecd 100644 --- a/middleman-core/features/slim.feature +++ b/middleman-core/features/slim.feature @@ -78,4 +78,4 @@ Feature: Support slim templating language When I go to "/sass.html" Then I should see "html,body,div" When I go to "/error.html" - Then I should see "Syntax error" + Then I should see "Error: Invalid" diff --git a/middleman-core/fixtures/frontmatter-app/source/front-matter-pandoc.html.md.erb b/middleman-core/fixtures/frontmatter-app/source/front-matter-pandoc.html.md.erb new file mode 100644 index 00000000..b800a11b --- /dev/null +++ b/middleman-core/fixtures/frontmatter-app/source/front-matter-pandoc.html.md.erb @@ -0,0 +1,13 @@ +--- +layout: false +title: Pandoc likes trailing dots... +dotty_string: "..." +famous_quote: To be or not to be +popular_number: 42 +... + +# This is a document + +<%= current_page.data.famous_quote %> + +The meaning of life is <%= current_page.data.popular_number %>. diff --git a/middleman-core/lib/middleman-core/core_extensions/front_matter.rb b/middleman-core/lib/middleman-core/core_extensions/front_matter.rb index 3301badf..4a1f9f32 100644 --- a/middleman-core/lib/middleman-core/core_extensions/front_matter.rb +++ b/middleman-core/lib/middleman-core/core_extensions/front_matter.rb @@ -115,7 +115,7 @@ module Middleman::CoreExtensions # @return [Array] Contract String, Pathname => Maybe[[Hash, String]] def parse_yaml_front_matter(content, full_path) - yaml_regex = /\A(---\s*\n.*?\n?)^(---\s*$\n?)/m + yaml_regex = /\A(---\s*\n.*?\n?)^((---|\.\.\.)\s*$\n?)/m if content =~ yaml_regex content = content.sub(yaml_regex, '') diff --git a/middleman-core/lib/middleman-core/extensions/automatic_image_sizes.rb b/middleman-core/lib/middleman-core/extensions/automatic_image_sizes.rb index 74f3b805..49ef706f 100644 --- a/middleman-core/lib/middleman-core/extensions/automatic_image_sizes.rb +++ b/middleman-core/lib/middleman-core/extensions/automatic_image_sizes.rb @@ -16,8 +16,6 @@ class Middleman::Extensions::AutomaticImageSizes < ::Middleman::Extension # @return [String] def image_tag(path, params={}) if !params.key?(:width) && !params.key?(:height) && !path.include?('://') - params[:alt] ||= '' - real_path = path.dup real_path = File.join(config[:images_dir], real_path) unless real_path.start_with?('/') diff --git a/middleman-core/lib/middleman-core/renderers/sass.rb b/middleman-core/lib/middleman-core/renderers/sass.rb index a63c8026..3b2ad68a 100644 --- a/middleman-core/lib/middleman-core/renderers/sass.rb +++ b/middleman-core/lib/middleman-core/renderers/sass.rb @@ -87,7 +87,7 @@ module Middleman begin @engine.render rescue ::Sass::SyntaxError => e - ::Sass::SyntaxError.exception_to_css(e, full_exception: true) + ::Sass::SyntaxError.exception_to_css(e) end end diff --git a/middleman/middleman.gemspec b/middleman/middleman.gemspec index 6e427e04..19d05ffd 100644 --- a/middleman/middleman.gemspec +++ b/middleman/middleman.gemspec @@ -22,7 +22,8 @@ Gem::Specification.new do |s| s.add_dependency('middleman-cli', Middleman::VERSION) # s.add_dependency('middleman-sprockets', '>= 3.1.2') Disabled in alphas # s.add_dependency('middleman-compass', '4.0.0.alpha.2') - s.add_dependency('sass', ['>= 3.3.0']) + s.add_dependency('sass', ['>= 3.4.0', '< 4.0']) + s.add_dependency('compass-import-once', ['1.0.5']) s.add_dependency('haml', ['>= 4.0.5']) s.add_dependency('coffee-script', ['~> 2.2']) s.add_dependency('kramdown', ['~> 1.2'])