Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion assets/javascripts/vendor/prism.js
Original file line number Diff line number Diff line change
Expand Up @@ -3186,6 +3186,19 @@ Prism.languages.sql = {
'punctuation': /[;[\]()`,.]/
};

Prism.languages.liquid = {
keyword:/\b(?:comment|endcomment|if|elsif|else|endif|unless|endunless|for|endfor|case|endcase|when|in|break|assign|continue|limit|offset|range|reversed|raw|endraw|capture|endcapture|tablerow|endtablerow)\b/,
number:/\b0b[01]+\b|\b0x(?:\.[\da-fp-]+|[\da-f]+(?:\.[\da-fp-]+)?)\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?[df]?/i,
operator:{
pattern:/(^|[^.])(?:\+[+=]?|-[-=]?|!=?|<<?=?|>>?>?=?|==?|&[&=]?|\|[|=]?|\*=?|\/=?|%=?|\^=?|[?:~])/m,
lookbehind:!0
},
function:{
pattern:/(^|[\s;|&])(?:append|prepend|capitalize|cycle|cols|increment|decrement|abs|at_least|at_most|ceil|compact|concat|date|default|divided_by|downcase|escape|escape_once|first|floor|join|last|lstrip|map|minus|modulo|newline_to_br|plus|remove|remove_first|replace|replace_first|reverse|round|rstrip|size|slice|sort|sort_natural|split|strip|strip_html|strip_newlines|times|truncate|truncatewords|uniq|upcase|url_decode|url_encode|include|paginate)(?=$|[\s;|&])/,
lookbehind:!0
}
};

(function (Prism) {

Prism.languages.typescript = Prism.languages.extend('javascript', {
Expand Down Expand Up @@ -3305,4 +3318,3 @@ Prism.languages.sql = {
Prism.languages.yml = Prism.languages.yaml;

}(Prism));

5 changes: 5 additions & 0 deletions lib/docs/filters/liquid/clean_html.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ def call
node.content = node.content.strip
end

css('pre.highlight').each do |node|
node['data-language'] = "liquid"
node['class'] = "language-liquid"
end

doc
end
end
Expand Down
3 changes: 2 additions & 1 deletion lib/docs/scrapers/liquid.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ class Liquid < UrlScraper
self.name = 'Liquid'
self.type = 'liquid'
self.base_url = 'https://shopify.github.io/liquid/'
self.release = '4.0.0'
self.release = '5.0.0'
self.links = {
home: 'https://shopify.github.io/liquid/',
code: 'https://github.com/Shopify/liquid'
Expand All @@ -24,5 +24,6 @@ def get_latest_version(opts)
tags = get_github_tags('Shopify', 'liquid', opts)
tags[0]['name'][1..-1]
end

end
end
Binary file modified public/icons/docs/liquid/16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified public/icons/docs/liquid/16@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.