[devdocsgjs/main: 1481/1867] Update liquid to 5.0
- From: Andy Holmes <andyholmes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [devdocsgjs/main: 1481/1867] Update liquid to 5.0
- Date: Fri, 19 Nov 2021 23:48:05 +0000 (UTC)
commit ed15918157471433a0c4981634a1b15b4e3b9a10
Author: Enoc <brianhernandez222 hotmail com>
Date: Sat Jan 30 11:22:30 2021 -0600
Update liquid to 5.0
Add prism highlight for liquid
assets/javascripts/vendor/prism.js | 14 +++++++++++++-
lib/docs/filters/liquid/clean_html.rb | 5 +++++
lib/docs/scrapers/liquid.rb | 3 ++-
public/icons/docs/liquid/16.png | Bin 458 -> 1130 bytes
public/icons/docs/liquid/16 2x png | Bin 847 -> 1622 bytes
5 files changed, 20 insertions(+), 2 deletions(-)
---
diff --git a/assets/javascripts/vendor/prism.js b/assets/javascripts/vendor/prism.js
index 608f999c..f12cee68 100644
--- a/assets/javascripts/vendor/prism.js
+++ b/assets/javascripts/vendor/prism.js
@@ -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', {
@@ -3305,4 +3318,3 @@ Prism.languages.sql = {
Prism.languages.yml = Prism.languages.yaml;
}(Prism));
-
diff --git a/lib/docs/filters/liquid/clean_html.rb b/lib/docs/filters/liquid/clean_html.rb
index 1a28d112..3cacc29a 100644
--- a/lib/docs/filters/liquid/clean_html.rb
+++ b/lib/docs/filters/liquid/clean_html.rb
@@ -14,6 +14,11 @@ module Docs
node.content = node.content.strip
end
+ css('pre.highlight').each do |node|
+ node['data-language'] = "liquid"
+ node['class'] = "language-liquid"
+ end
+
doc
end
end
diff --git a/lib/docs/scrapers/liquid.rb b/lib/docs/scrapers/liquid.rb
index b8e40d59..e68724b5 100644
--- a/lib/docs/scrapers/liquid.rb
+++ b/lib/docs/scrapers/liquid.rb
@@ -3,7 +3,7 @@ module Docs
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'
@@ -24,5 +24,6 @@ module Docs
tags = get_github_tags('Shopify', 'liquid', opts)
tags[0]['name'][1..-1]
end
+
end
end
diff --git a/public/icons/docs/liquid/16.png b/public/icons/docs/liquid/16.png
index a3de84ad..c7049be7 100644
Binary files a/public/icons/docs/liquid/16.png and b/public/icons/docs/liquid/16.png differ
diff --git a/public/icons/docs/liquid/16 2x png b/public/icons/docs/liquid/16 2x png
index d852600d..ffdaa3b0 100644
Binary files a/public/icons/docs/liquid/16 2x png and b/public/icons/docs/liquid/16 2x png differ
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]