Log kramdown warnings if log level is WARN (#6522)

Merge pull request 6522
This commit is contained in:
Florian Thomas
2017-11-09 14:11:05 +00:00
committed by jekyllbot
parent 1f3ce72f6b
commit fa22ebf056
3 changed files with 18 additions and 2 deletions

View File

@@ -37,7 +37,12 @@ module Jekyll
end
def convert(content)
Kramdown::Document.new(content, @config).to_html
document = Kramdown::Document.new(content, @config)
html_output = document.to_html
document.warnings.each do |warning|
Jekyll.logger.warn "Kramdown warning:", warning
end
html_output
end
private

View File

@@ -29,7 +29,12 @@ module Jekyll
end
def convert(content)
Kramdown::Document.new(content, @config).to_html.chomp
document = Kramdown::Document.new(content, @config)
html_output = document.to_html.chomp
document.warnings.each do |warning|
Jekyll.logger.warn "Kramdown warning:", warning
end
html_output
end
end
end