Commit Graph
38 Commits
Author SHA1 Message Date
Jason Roelofs 173a58d36a Profile liquid rendering
Add a simple profiling system to liquid rendering. Each
liquid tag ({{ }} and {% %}) is processed through this profiling,
keeping track of the partial name (in the case of {% include %}), line
number, and the time it took to render the tag. In the case of {%
include %}, the profiler keeps track of the name of the partial and
properly links back tag rendering to the partial and line number for
easy lookup and dive down. With this, it's now possible to track down
exactly how long each tag takes to render.

These hooks get installed and uninstalled on an as-need basis so by
default there is no impact on the overall liquid execution speed.
2014-08-12 15:37:21 -04:00
Dylan Thacker-Smith 2aa9bbbac2 Separate expression parsing and rendering from Context#resolve. 2014-08-11 14:15:58 -07:00
David Cornu f57383af37 Allow tag classes to be reloaded when using Liquid.cache_classes is false
Because Liquid keeps a reference to tag classes, Rails class reloading may
cause problems with custom tags. This commit introduces a setting that
allows these classes to be resolved when required.
2014-07-02 20:03:18 +00:00
Florian Weingarten 3dbb35d823 Merge branch 'freeze_all_the_things'
Conflicts:
	History.md
	lib/liquid/tags/assign.rb
	lib/liquid/tags/capture.rb
	lib/liquid/tags/decrement.rb
	lib/liquid/tags/if.rb
2014-03-24 12:39:34 -04:00
Dylan Thacker-Smith fdf03076e0 Revert "Merge pull request #325 from Shopify/remove-variable-incomplete-end"
That pull request broke raw tags with open variable tags. E.g.

{% raw %}
{{
{% endraw %}
{{ 1 }}

This reverts commit fbaabf3b59, reversing
changes made to af24d2c2ab.
2014-03-24 09:59:07 -04:00
Dylan Thacker-Smith d8d9984a7b Remove some unused regexes. 2014-03-21 15:50:14 -04:00
Dylan Thacker-Smith 7e0ef867d2 Make tag/variable termination error clearer. 2014-03-21 02:04:01 -04:00
Dylan Thacker-Smith 3682414cc4 Allow quoted single curly braces in variables. 2014-03-21 02:04:01 -04:00
Dylan Thacker-Smith 3b14e27f55 Allow newlines in tags and variables. 2014-03-20 17:27:03 -04:00
Dylan Thacker-Smith 92781ec43b Move definition for TableRow to the tags folder. 2014-03-18 17:13:39 -04:00
Dylan Thacker-Smith 503d924274 Use start and end of string rather than line matching in regexes. 2014-03-13 17:56:42 -04:00
Florian Weingarten 43ac8d560b Freeze all the things 2014-01-07 12:35:16 -05:00
Simon Eskildsen f37a984fd7 Add sketch of I18n error translation 2013-08-30 12:31:57 -04:00
Tristan Hume 76272a1afa Bring back the lexer 2013-07-24 14:40:29 -04:00
Tristan Hume ee14775f83 Replace hand-coded lexer with faster hacky lexer. 2013-07-24 11:41:47 -04:00
Tristan Hume 2332d86156 Slow lexer and parser scaffold. 2013-07-24 11:35:00 -04:00
Arthur Neves 1849c24f2c Adding version file
Follow the standard structure of having a version.rb file
2013-06-06 14:10:45 -04:00
Tom Burns 8913a5615a Revert "Merge pull request #185 from ISSIntel/liquid-utf8"
This reverts commit c5dfcd29b0, reversing
changes made to f7d1e1d0c1.
2013-05-20 19:53:13 -04:00
Adam Tanner 0b36540b78 Liquid has UTF8 support. 2012-12-26 18:14:36 -08:00
Jon Daniel 9c183bea83 added interrupt class for continue/break statements
When a continue or break statement is executed it pushes an interrupt to a
stack in context. If any non-handled interrupts are present blocks will cease
to execute. The for loop can handle the most recent interrupt in the stack.
2012-08-21 13:14:27 -04:00
Dylan Smith d0184555d9 Allow tablerow to work with any Enumerable. Closes #132 2012-06-20 11:07:11 -04:00
Michael Green 281e3ea9c8 add interpolate once flag to regexes that never change 2012-05-08 16:27:50 -07:00
Jonathan Rudenberg 2434c3d0e0 Remove duplicate commas from StrictQuotedFragment. Closes #26. 2011-07-12 09:18:46 -04:00
Jonathan Rudenberg 4aaf750fa8 Don't mess with the load path 2011-06-30 16:31:37 -04:00
Jonathan Rudenberg f85bea2902 Remove literal tag (raw is more performant)
This reverts commit c00a650492.
2011-06-13 09:34:15 -04:00
DBAandTobias Lütke 3d43efe2bc Ruby compatibility issues
- regexp engines are different from 1.8 to 1.9, fixed the literal shorthand regexp accordingly
  - changed the shorthand regexp text from a match to a string scan
  - test_helper now loads rubygems unless RUBY_VERSION is > 1.9
2010-08-24 08:17:42 +08:00
DBAandTobias Lütke c00a650492 Literal
- added support for literals [closes #6]

Code beautifier
  - indented some files
2010-08-24 08:17:42 +08:00
DBAandTobias Lütke 8a0a8cfd99 FiltersTest
- added test that asserts nonexistent filters are ignored

Liquid
  - Bill's mind blowing liquid patch to support filter separators (|) in quoted strings (svn r7516).
  - This is a consolidation effort based on newrelic's liquid fork commit 88a5b891d009054d56b994c9448725c74e2b1e13
2010-08-23 01:30:05 +08:00
James MacAulay 2d0532e041 QuotedStrings can be empty 2009-08-19 18:37:40 -04:00
Brian Candler f29b9335c5 Allow question-mark at end of variable name only 2009-06-06 16:20:34 +01:00
Tobias Lütke 88309cf415 Fixed some parse errors thanks to Daniel Sheppard [Closes #6] 2008-12-22 11:47:26 -05:00
Tobias Lütke 7b9b5f31fb Merge branch 'experimental' of git://github.com/jamesmacaulay/liquid into jamesmacaulay/experimental
Conflicts:

	lib/liquid.rb
	lib/liquid/variable.rb
2008-11-02 10:11:08 -08:00
Tobias Lütke 96c998a944 Merge branch 'master' of git://github.com/mhw/liquid into mhw/master 2008-11-02 10:06:02 -08:00
James MacAulay 282786d7e2 if blocks work with filtered variables 2008-10-15 17:02:26 -04:00
Mark H. Wilkinson 916f501bde Fix spelling of FilterSeparator constant. 2008-08-18 20:32:34 +01:00
Mark H. Wilkinson 7eeb895192 Remove trailing whitespace. 2008-08-18 20:32:30 +01:00
Emmanuel Oga 3eddf5fb9e adjusted parsing regex for syntax quirk 2008-07-08 12:54:52 -03:00
Tobias Lütke 1d647361e1 Initial github import of liquid 2008-05-08 11:28:13 -04:00