Dylan Thacker-Smith
871336753e
Add source migration support for all builtin tags
2022-11-24 11:05:14 -05:00
Dylan Thacker-Smith
106ca1bd69
Quote non-strictly valid identifiers in variable lookups
2022-11-17 09:51:23 -05:00
Dylan Thacker-Smith
7d2a9da8bc
Preserve separator at start of variable from QuotedFragment skipped chars
2022-11-17 09:50:12 -05:00
Dylan Thacker-Smith
e20df18eca
[WIP] Add support for migrating liquid code away from several lax parse quirks
...
It transforms liquid code to equivalently parsed code, that doesn't depend
on lax parsing quirks.
Note that this transformation can hide the intent of the original code, so
it is best to review the changes, since removed syntax often would indicate
a bug in the original liquid code.
2022-11-16 17:35:29 -05:00
Shaina Raskas
8b1b9f649a
remove separate inline comment tag for IA reasons
2022-11-11 16:21:18 -05:00
Shaina Raskas
474315c6bb
edits
2022-11-11 16:03:52 -05:00
Shaina Raskas
667664bb22
clarify inline_comment
2022-11-11 15:34:35 -05:00
Dylan Thacker-Smith and GitHub
1cdd1f0834
refactor: Advance tokenizer array offset instead of using Array#shift ( #1653 )
...
Array#shift would move all the remaining elements of the array, which
is slower for larger arrays.
2022-11-09 13:03:33 -05:00
Peter Zhu
abed47547c
Fix tags in comment
2022-11-01 13:04:41 -04:00
Dylan Thacker-Smith
db8e85ab31
Prevent an internal error in include tag from non-string template_name
...
which would otherwise happen on `template_name.split('/')`
2022-10-28 13:59:00 -04:00
Dylan Thacker-Smith and GitHub
3e8994c258
Have subclasses of a tag inherit superclass's disabled tags ( #1646 )
2022-10-27 11:13:50 -04:00
Erin Morrissey and GitHub
7ccac29688
Merge pull request #1635 from Shopify/update-doc-links
...
Update link paths in docs markup
2022-10-26 11:07:46 -07:00
Dylan Thacker-Smith and GitHub
96b5325f87
Remove Usage.increment calls that have been shown to in fact be used ( #1645 )
...
I think these were added for undocumented features to see if they were
actually used and they were being used.
2022-10-26 09:21:43 -04:00
Erin Morrissey
b8f05267a9
update link paths in docs markup
2022-10-25 11:53:27 -07:00
Dylan Thacker-Smith and GitHub
6ce4ec1011
tablerow: Avoid accidental special case for constant nil cols ( #1644 )
...
It should behave the same as an expression that evaluates to nil
2022-10-25 10:21:03 -04:00
Dylan Thacker-Smith
6765d93938
Avoid internal errors for large arguments to slice filter
...
Use saturating conversion, which has expected semantics for large integers.
2022-10-11 12:44:32 -04:00
Dylan Thacker-Smith
4f17abfb4a
Handle truncatewords word length out of range as if no truncation is needed
2022-10-11 12:44:32 -04:00
Michael Go and GitHub
eff2a63204
Merge pull request #1633 from Shopify/fix-tablerow-drop-cols-last-attr
...
fix tablerow drop's last attribute with missing cols param
2022-10-05 14:15:03 -03:00
Michael Go
fbab19ac8c
fix tablerow drop's last attribute with missing cols param
2022-10-05 11:15:23 -03:00
Jan Emge-Triebel
951be6c1f5
Clarified comment's liquid description
2022-09-30 09:07:06 +00:00
liamgriffin
f21d1c5d9d
Update escape filter reference summary
...
Added more context/ explanation for escape filter
Fixes issue in dev docs https://github.com/Shopify/shopify-dev/pull/26494
2022-09-28 12:24:46 +01:00
Dylan Thacker-Smith and GitHub
cab08cfe57
Stop freezing the static environment hashes to allow Proc memoization ( #1623 )
2022-09-14 15:00:57 -04:00
Marco Concetto Rudilosso and Dylan Thacker-Smith
c0f565ce7b
Update lib/liquid/tags/render.rb
...
Co-authored-by: Dylan Thacker-Smith <[email protected] >
2022-09-08 10:37:23 -04:00
Marco Concetto Rudilosso and GitHub
753015d8fc
remove question mark
2022-09-08 15:59:46 +02:00
Marco Concetto Rudilosso and GitHub
f4e32d2214
Expose alias_name and for_loop? in render tag
2022-09-08 15:38:18 +02:00
Dylan Thacker-Smith and GitHub
3a736da222
Add a variable_name method Increment and Decrement tags objects ( #1609 )
...
In order to expose this state when using the parse tree.
2022-08-31 09:18:33 -04:00
Dylan Thacker-Smith and GitHub
eb89f22d93
Raise Liquid::SyntaxError instead of NoMethodError for invalid range ( #1607 )
2022-08-25 12:03:56 -04:00
Watson
7611463f02
Increase performance in Liquid::Lexer#tokenize
...
To obtain String Literal, the regular expression might be executed at two times.
It would be slightly faster to run them all at once using `Regexp.union`.
− | before | after | result
-- | -- | -- | --
parse | 63.418 | 65.183 | 1.028x
render | 195.389 | 195.648 | -
parse & render | 46.091 | 46.917 | 1.018x
### Environment
- MacBook Pro (14 inch, 2021)
- macOS 13.0 Beta
- Apple M1 Max
- Ruby 3.1.2
### Before
```
Running benchmark for 10 seconds (with 5 seconds warmup).
Warming up --------------------------------------
parse: 6.000 i/100ms
render: 19.000 i/100ms
parse & render: 4.000 i/100ms
Calculating -------------------------------------
parse: 63.418 (± 0.0%) i/s - 636.000 in 10.028939s
render: 195.389 (± 0.5%) i/s - 1.957k in 10.016466s
parse & render: 46.091 (± 0.0%) i/s - 464.000 in 10.067445s
```
### After
```
Running benchmark for 10 seconds (with 5 seconds warmup).
Warming up --------------------------------------
parse: 6.000 i/100ms
render: 19.000 i/100ms
parse & render: 4.000 i/100ms
Calculating -------------------------------------
parse: 65.183 (± 0.0%) i/s - 654.000 in 10.033549s
render: 195.648 (± 1.0%) i/s - 1.957k in 10.003511s
parse & render: 46.917 (± 0.0%) i/s - 472.000 in 10.060782s
```
2022-08-24 04:23:05 +09:00
Charles-P. Clermont
6f8722a6d3
Bump version to 5.4.0 for release
2022-07-28 13:47:53 -04:00
Zoey Lan
c9ec8f4635
Expose global filter names
2022-07-21 12:34:41 -06:00
Charles-P. Clermont
992e15a173
Add variable_name_expr to render's ParseTreeVisitor
...
Solves Shopify/theme-check#582
`icon` should be visited in the render tag for the following snippet:
```liquid
{% assign icon = 'warning' }
{% render 'icon' with icon %}
```
2022-07-18 08:48:18 -04:00
Jake Olney
74245cd396
clarify sort_natural and fix unless syntax
2022-07-12 18:33:15 -07:00
Dylan Thacker-Smith and GitHub
86605016e1
Add Liquid::VariableLookup#lookup_command? to expose this parse node state ( #1583 )
2022-07-04 14:42:05 -04:00
Jake Olney
6d3c5ef3d3
document forloop.parentloop
2022-06-28 17:10:25 -07:00
Jake Olney
a3e9088a0e
fix concat category
2022-06-27 12:22:18 -07:00
Jake Olney and Melanie Wang
b05393884d
update empty
2022-06-27 15:10:24 -04:00
Jake Olney and Melanie Wang
ef9db08642
fix typo
2022-06-27 15:10:24 -04:00
Jake Olney and Melanie Wang
5dd8c84b47
remove liquid tag
2022-06-27 15:10:23 -04:00
Jake Olney and Melanie Wang
1af12c74cc
fix default category
2022-06-27 15:10:23 -04:00
Jake Olney and Melanie Wang
72bbbda022
updates from audit
2022-06-27 15:10:23 -04:00
Jake Olney and Melanie Wang
489e3ca7bf
update tablerow to tablerowloop
2022-06-27 15:10:23 -04:00
Jake Olney and Melanie Wang
65542f9e4f
small change for for syntax keyword
2022-06-27 15:10:23 -04:00
Jake Olney and Melanie Wang
d497bfffe9
update for and tablerow
2022-06-27 15:10:22 -04:00
Jake Olney and Melanie Wang
ebafb0a3fe
changes from example feedback
2022-06-27 15:10:22 -04:00
Jake Olney and Melanie Wang
4ec9db3f99
iain feedback
2022-06-27 15:10:22 -04:00
Jake Olney and Melanie Wang
95eb5d6036
add inline_comment
2022-06-27 15:10:22 -04:00
Jake Olney and Melanie Wang
7ba40d48c0
fix lint error
2022-06-27 15:10:22 -04:00
Jake Olney and Melanie Wang
9020dbcd41
shaina feedback
2022-06-27 15:10:22 -04:00
Jake Olney and Melanie Wang
73f7467258
fix lint errors
2022-06-27 15:10:21 -04:00
Jake Olney and Melanie Wang
f3aa5fbd7c
add yard tags
2022-06-27 15:10:21 -04:00