Skip to content

Commit

Permalink
Allow array in context
Browse files Browse the repository at this point in the history
  • Loading branch information
diarmuidie committed May 5, 2020
1 parent 0cffeb7 commit 30f9a63
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions lib/jekyll-html-pipeline.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ def symbolize_keys(hash)
end
new_value = case value
when Hash then symbolize_keys(value)
when Array then value.map &:to_sym
else value
end
result[new_key] = new_value
Expand Down
7 changes: 6 additions & 1 deletion test/test_jekyll_html_pipeline.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,12 @@ def setup
@config = {
'html_pipeline' => {
'filters' => ['markdownfilter', 'sanitizationfilter', 'emojifilter', 'mentionfilter'],
'context' => { 'asset_root' => 'http://foo.com/icons', 'base_url' => 'https://github.com/'}},
'context' => {
'asset_root' => 'http://foo.com/icons',
'base_url' => 'https://github.com/',
'commonmarker_extensions' => ['table', 'strikethrough', 'tagfilter', 'autolink']
}
},
'markdown' => 'HTMLPipeline'
}
@markdown = Jekyll::Converters::Markdown.new @config
Expand Down

0 comments on commit 30f9a63

Please sign in to comment.