mirror of
https://github.com/jekyll/jekyll.git
synced 2026-01-31 17:58:29 -05:00
Merge pull request #2720 from jekyll/read-in-utf8
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
# encoding: UTF-8
|
||||
|
||||
module Jekyll
|
||||
class Document
|
||||
include Comparable
|
||||
@@ -82,7 +84,7 @@ module Jekyll
|
||||
end
|
||||
|
||||
# Determine whether the document has a YAML header.
|
||||
#
|
||||
#
|
||||
# Returns true if the file starts with three dashes
|
||||
def has_yaml_header?
|
||||
@has_yaml_header unless @has_yaml_header.nil?
|
||||
@@ -198,7 +200,7 @@ module Jekyll
|
||||
unless defaults.empty?
|
||||
@data = defaults
|
||||
end
|
||||
@content = File.open(path, "rb") { |f| f.read }
|
||||
@content = File.open(path, "rb", merged_file_read_opts(opts)) { |f| f.read }
|
||||
if content =~ /\A(---\s*\n.*?\n?)^(---\s*$\n?)/m
|
||||
@content = $POSTMATCH
|
||||
data_file = SafeYAML.load($1)
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# encoding: UTF-8
|
||||
|
||||
module Jekyll
|
||||
class Renderer
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# encoding: UTF-8
|
||||
|
||||
module Jekyll
|
||||
class Site
|
||||
attr_accessor :config, :layouts, :posts, :pages, :static_files,
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# encoding: UTF-8
|
||||
|
||||
module Jekyll
|
||||
module Tags
|
||||
class IncludeTagError < StandardError
|
||||
|
||||
Reference in New Issue
Block a user