Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Liquid's pattern for matching include tag's filename argument #1351

Merged
merged 1 commit into from Nov 29, 2019
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/rouge/lexers/liquid.rb
Expand Up @@ -266,7 +266,7 @@ class Liquid < RegexLexer
end

rule %r/(with|for)\b/, Name::Tag
rule %r/[^\s\.]+(\.[^\s\.]+)+\b/, Name::Other
rule %r/[\/\w-]+(\.[\w-]+)+\b/, Text
pyrmont marked this conversation as resolved.
Show resolved Hide resolved

mixin :variable_tag_markup
end
Expand Down
4 changes: 2 additions & 2 deletions spec/visual/samples/liquid
Expand Up @@ -57,8 +57,8 @@ Some other {{ output }}!
{% else %}
{% endcase %}

{% include file.html param = 'value' param2 = object %}
{% include 'snippet', param: 'value', param2: object %}
{% include dir/file.html param = 'example.com' param2 = object %}
{% include 'snippet', param: 'example.com', param2: object %}
{% include product_page with products[0] %}
{% include {{product_page | split: "." | first}} for products %}

Expand Down