diff --git a/bridgetown-core/lib/bridgetown-core/concerns/front_matter_importer.rb b/bridgetown-core/lib/bridgetown-core/concerns/front_matter_importer.rb index dcc58cd86..6bc103edc 100644 --- a/bridgetown-core/lib/bridgetown-core/concerns/front_matter_importer.rb +++ b/bridgetown-core/lib/bridgetown-core/concerns/front_matter_importer.rb @@ -9,9 +9,9 @@ def self.included(klass) YAML_HEADER = %r!\A---\s*\n!.freeze YAML_BLOCK = %r!\A(---\s*\n.*?\n?)^((---|\.\.\.)\s*$\n?)!m.freeze - RUBY_HEADER = %r!\A[~`#\-]{3,}(?:ruby|<%|{%)\s*\n!.freeze + RUBY_HEADER = %r!\A[~`#-]{3,}(?:ruby|<%|{%)\s*\n!.freeze RUBY_BLOCK = - %r!#{RUBY_HEADER.source}(.*?\n?)^((?:%>|%})?[~`#\-]{3,}\s*$\n?)!m.freeze + %r!#{RUBY_HEADER.source}(.*?\n?)^((?:%>|%})?[~`#-]{3,}\s*$\n?)!m.freeze def read_front_matter(file_path) # rubocop:todo Metrics/AbcSize, Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity, Metrics/MethodLength file_contents = File.read( diff --git a/bridgetown-core/lib/bridgetown-core/model/repo_origin.rb b/bridgetown-core/lib/bridgetown-core/model/repo_origin.rb index 63dd6d13e..f6e6336ac 100644 --- a/bridgetown-core/lib/bridgetown-core/model/repo_origin.rb +++ b/bridgetown-core/lib/bridgetown-core/model/repo_origin.rb @@ -7,9 +7,9 @@ class RepoOrigin < Origin include Bridgetown::Utils::RubyFrontMatterDSL YAML_FRONT_MATTER_REGEXP = %r!\A(---\s*\n.*?\n?)^((---|\.\.\.)\s*$\n?)!m.freeze - RUBY_FRONT_MATTER_HEADER = %r!\A[~`#\-]{3,}(?:ruby|<%|{%)\s*\n!.freeze + RUBY_FRONT_MATTER_HEADER = %r!\A[~`#-]{3,}(?:ruby|<%|{%)\s*\n!.freeze RUBY_FRONT_MATTER_REGEXP = - %r!#{RUBY_FRONT_MATTER_HEADER.source}(.*?\n?)^((?:%>|%})?[~`#\-]{3,}\s*$\n?)!m.freeze + %r!#{RUBY_FRONT_MATTER_HEADER.source}(.*?\n?)^((?:%>|%})?[~`#-]{3,}\s*$\n?)!m.freeze # @return [String] attr_accessor :content diff --git a/bridgetown-core/test/helper.rb b/bridgetown-core/test/helper.rb index f6e73ee08..8bd2b74b1 100644 --- a/bridgetown-core/test/helper.rb +++ b/bridgetown-core/test/helper.rb @@ -247,8 +247,6 @@ def mount_server(&block) server.start addr = server.listeners[0].addr block.yield([server, addr[3], addr[1]]) - rescue StandardError => e - raise e ensure server.shutdown sleep 0.1 until server.status == :Stop