Commit Graph
193 Commits
Author SHA1 Message Date
Tim Felgentreff c7033ff4c8 Avoid creating singleton classes on nil, true and false objects. Instead extend their respective classes. Just because those objects are singletons in current Ruby implementations doesn't mean we should rely on that. Fixes liquid on Maglev. 2011-06-13 18:13:47 +02:00
Jonathan Rudenberg f85bea2902 Remove literal tag (raw is more performant)
This reverts commit c00a650492.
2011-06-13 09:34:15 -04:00
Jonathan Rudenberg 17922273e1 Merge old Shopify/liquid 2011-06-13 09:31:31 -04:00
Jonathan Rudenberg 4087a94d88 Add raw tag. Fixes #37.
Thanks to phaer: https://gist.github.com/1020852

YO DAWG, WE HEARD YOU LIKE LIQUID

SO WE PUT A RAW TAG IN YOUR LIQUID
SO YOU CAN HAVE LIQUID IN YOUR LIQUID
2011-06-12 11:15:16 -04:00
Steven Soroka 1a4ff9547a render_all should internally always return strings. This eases some 1.9 compatability issues. 2011-05-02 10:58:27 -04:00
Steven Soroka 74cdfc6718 Fix commit 7bbb4ff84f so it's backwards-compatible 2011-04-28 15:18:51 -05:00
Prathan Thananart d19213177a Added documentation for for-else 2011-04-28 13:11:13 +07:00
Prathan Thananart caf59940d3 Added code to make for-else work 2011-04-28 13:07:41 +07:00
Tobias Lütke bc55c4d348 Merged pull request #34 from claco/date-epoch.
Epoch support
2011-04-25 09:03:30 -07:00
Tobias Lütke ab556cbdd9 Merged pull request #54 from mhw/fix-drop-numeric-parameter.
Fix passing numeric parameter to drops
2011-04-25 08:59:10 -07:00
Steven Soroka 59a63e0fe5 fix failing test "recursively_included_template_does_not_produce_endless_loop", push needs to come before exception raise since pop is in ensure block and always happens. 2011-04-24 01:09:56 -05:00
Mark H. Wilkinson 935d3530af Handle invoking drops for keys that are not strings.
For example, {{ pages[8] ... }} will result in the integer value 8 being
passed to invoke_drop.
2011-04-12 14:11:06 +01:00
David TurnbullandTobias Lütke 7bbb4ff84f Context is no longer lost when moving into a Liquid FileSystem. 2011-01-28 21:19:44 -05:00
thedarkoneandTobias Lütke f7ff9c81d3 Make use of the Module#public_method_defined?. 2011-01-28 21:16:22 -05:00
thedarkoneandTobias Lütke a65c4f51bc These are strings already. 2011-01-28 21:16:22 -05:00
thedarkoneandTobias Lütke a24049906b Resolve literals faster. 2011-01-28 21:16:22 -05:00
thedarkoneandTobias Lütke aa678302d6 Fix comments. 2011-01-28 21:16:22 -05:00
thedarkoneandTobias Lütke 6d0bb3303c Clean-up Context#stack. 2011-01-28 21:16:22 -05:00
Austin Mills 4fec29f288 OPS-250 Modifying liquid error handling so that it no longer captures Exceptions that are not subclasses of StandardError (previously, it was rescuing things like Interrupt and NoMemoryError). 2011-01-10 14:55:05 -06:00
Christopher H. Laco 33ecb29d49 Update date to accept epoch 2010-11-07 20:41:41 -05:00
Michael Richardson 58e5820e7a thought that these were turned off, removed 2010-09-03 10:54:29 -04:00
Michael Richardson 3919ff6bc3 renamed inc -> increment
added decrement as well (pre-decremented)
2010-09-02 09:41:43 -04:00
Michael Richardson 97f18112b2 the variables should be stored in the normal environment, not in the register 2010-08-31 17:26:41 -04:00
Michael Richardson ca2fa587cf added tag to increment a variable each time it is referenced 2010-08-31 16:17:12 -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 4819eb1a92 IF tag
- now properly allows operands to have conditions (eg and, or) [closes #13]
2010-08-24 08:17:41 +08:00
DBAandTobias Lütke 8579807d29 Conditions
- added test to assert that conditions can contain conditions within its value (eg 'a-and-b')

Tags
  - indented the if tag

Tests
  - added ruby-debug to the test_helper
  - indented some tests
2010-08-24 08:17:41 +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
DBAandTobias Lütke 8304a046c9 Context
- Check arity of proc before calling, to prevent error when using ruby 1.9.1+

Code beautifer
  - context.rb
2010-08-23 01:30:03 +08:00
DBAandTobias Lütke c59cde9d17 Code beautifier
- standardfilters.rb
  - standard_filter_test.rb
2010-08-23 01:30:00 +08:00
DBAandTobias Lütke 29e140b655 StandardFilters
- added escape_once, based on ActionView
2010-08-23 01:30:00 +08:00
DBAandTobias Lütke 8e4573a7bf Strainer
- respond_to_missing? is now a required method
2010-08-23 01:29:59 +08:00
Tobias Lütke 6831eac902 Released gem 2.1.3 2010-08-05 18:07:05 -04:00
Dennis TheisenandTobias Lütke 13f98de7f3 Change behavior of capture tag to use existing variables if they already have been initialized in an outer scope. 2010-08-06 06:02:37 +08:00
Dennis TheisenandTobias Lütke e26f509277 Fixed minor typos in inline documentation for assign and capture 2010-08-06 06:02:37 +08:00
James MacAulay ff829e7996 fix if tag parsing with expressions starting with and/or 2010-07-07 16:48:23 -04:00
Jesse StorimerandJames MacAulay d87500bfe3 Liquid strip_html strips out the content of <script> tags. [#173 state:resolved] 2010-02-08 11:35:45 -05:00
James MacAulay fce8bcb1e7 Change behaviour of arithmetic filters to cast arguments to numbers 2010-02-04 11:45:55 -05:00
James MacAulay cbf8986745 fix variable output with quoted strings containing pipe ("|") characters 2009-09-23 15:54:25 -04:00
James MacAulay 11dc18bfdf A better fix for "and"/"or" in strings
(now with less side effects)
2009-09-23 15:44:29 -04:00
James MacAulay f42ce88456 fixed conditions with strings containing "and"/"or" 2009-09-14 15:01:26 -04:00
James MacAulay d1d6febfc1 'contains' operator returns false if either operand is nil 2009-08-19 19:38:31 -04:00
James MacAulay 0150067c40 Revert "Raise FilterNotFound on use of non-existent filter"
This reverts commit 01c25a11a3.

Conflicts:

	test/context_test.rb
2009-08-19 19:24:33 -04:00
James MacAulay 2d0532e041 QuotedStrings can be empty 2009-08-19 18:37:40 -04:00
James MacAulay 167825aa92 further differentiate between environments and only evaluate Procs once 2009-08-07 11:24:15 -04:00
James MacAulay c792c29066 Templates and Contexts differentiate between different sources of assigns 2009-08-06 18:33:41 -04:00
James MacAulay a4d7c80ce0 now able to set file_system for include tag through registers 2009-08-06 18:24:27 -04:00
Tobias Lütke 44f35c0990 Performance improvement for Block parsing. ~ 10% speedup 2009-06-15 10:33:33 -04:00
Tobias Lütke a65bd76e72 Merge branch 'master' of [email protected]:tobi/liquid
Conflicts:
	lib/liquid.rb
	lib/liquid/context.rb
	lib/liquid/variable.rb
	test/standard_tag_test.rb
2009-06-15 09:00:30 -04:00