lib/awestruct/handlers/front_matter_handler.rb in awestruct-0.6.4 vs lib/awestruct/handlers/front_matter_handler.rb in awestruct-0.6.5
- old
+ new
@@ -1,10 +1,9 @@
require 'awestruct/util/exception_helper'
+require 'awestruct/util/yaml_load'
require 'awestruct/handlers/base_handler'
-require 'yaml'
-
module Awestruct
module Handlers
class FrontMatterHandler < BaseHandler
def initialize(site, delegate)
@@ -83,10 +82,10 @@
@raw_content = nil
@content_line_offset = -1
end
begin
- @front_matter = yaml_content.empty? ? {} : (YAML.load(yaml_content) || {})
+ @front_matter = yaml_content.empty? ? {} : (Awestruct.yaml_load(yaml_content) || {})
rescue => e
ExceptionHelper.log_message "could not parse #{relative_source_path}"
ExceptionHelper.mark_failed
raise e
end