mirror of
https://github.com/jekyll/jekyll.git
synced 2026-02-16 09:37:11 -05:00
Optimize Kramdown::JekyllDocument#to_html calls (#8041)
Merge pull request 8041
This commit is contained in:
@@ -53,6 +53,16 @@ module Kramdown
|
||||
@options = JekyllDocument.options
|
||||
@root, @warnings = JekyllDocument.parser.parse(source, @options)
|
||||
end
|
||||
|
||||
# Use Kramdown::Converter::Html class to convert this document into HTML.
|
||||
#
|
||||
# The implementation is basically an optimized version of core logic in
|
||||
# +Kramdown::Document#method_missing+ from kramdown-2.1.0.
|
||||
def to_html
|
||||
output, warnings = Kramdown::Converter::Html.convert(@root, @options)
|
||||
@warnings.concat(warnings)
|
||||
output
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user