google-code-export / liquid-markup Goto Github PK
View Code? Open in Web Editor NEWAutomatically exported from code.google.com/p/liquid-markup
License: MIT License
Automatically exported from code.google.com/p/liquid-markup
License: MIT License
This patch causes Liquid to raise a SyntaxError when given the following code:
{{ some.call } ... {{ some.call }}
Prior to this patch it did not. If the parser finds opening braces which
are terminated by only a single brace then the exception is raised. If no
closing braces are present then no exception is raised.
Modifications to how Tags are parsed were not needed due to differences in
how Tag and Variable regular expressions are used in the parser.
Original issue reported on code.google.com by [email protected]
on 13 Sep 2007 at 9:03
Attachments:
Drops don't allow you to just inline a method, ie:
x = Drop.new
class << x
def monkeys
'monkeys'
end
end
Attached is a patch (including test)
Original issue reported on code.google.com by [email protected]
on 2 Nov 2007 at 12:47
Attachments:
I installed Mephisto and snagged the latest version of the Liquid plugin.
When I start mongrel, I would get this:
-bash-3.00$ mongrel_rails start
** Starting Mongrel listening at 0.0.0.0:3000
** Starting Rails with development environment...
/home/cobrabyte/web/cobrabyte_mephisto/vendor/plugins/liquid/init.rb:4:in
`evaluate_init_rb':
undefined method `register_template_handler' for ActionView::Base:Class
(NoMethodError)
from
/home/cobrabyte/web/cobrabyte_mephisto/config/../vendor/rails/railties/lib/rails
/plugin.rb:79
:in `evaluate_init_rb'
from
/home/cobrabyte/web/cobrabyte_mephisto/vendor/rails/activerecord/lib/../../activ
esupport/lib
/active_support/core_ext/kernel/reporting.rb:11:in `silence_warnings'
from
/home/cobrabyte/web/cobrabyte_mephisto/config/../vendor/rails/railties/lib/rails
/plugin.rb:75
:in `evaluate_init_rb'
from
/home/cobrabyte/web/cobrabyte_mephisto/config/../vendor/rails/railties/lib/rails
/plugin.rb:39
:in `load'
from
/home/cobrabyte/web/cobrabyte_mephisto/config/../vendor/rails/railties/lib/rails
/plugin/loade
r.rb:33:in `load_plugins'
from
/home/cobrabyte/web/cobrabyte_mephisto/config/../vendor/rails/railties/lib/rails
/plugin/loade
r.rb:32:in `each'
from
/home/cobrabyte/web/cobrabyte_mephisto/config/../vendor/rails/railties/lib/rails
/plugin/loade
r.rb:32:in `load_plugins'
from
/home/cobrabyte/web/cobrabyte_mephisto/config/../vendor/rails/railties/lib/initi
alizer.rb:184:i
n `load_plugins'
... 15 levels...
from /a/1/languages/ruby186d/lib/ruby/gems/1.8/gems/mongrel-
1.1.4/bin/../lib/mongrel/command.rb:212:in `run'
from /a/1/languages/ruby186d/lib/ruby/gems/1.8/gems/mongrel-
1.1.4/bin/mongrel_rails:281
from /a/1/languages/ruby/bin/mongrel_rails:16:in `load'
from /a/1/languages/ruby/bin/mongrel_rails:16
I did a little searching around and came across a message from the Rails Core
team at http://www.ruby-forum.com/topic/146246 . This post explains how
they've removed all the
template handling code from ActionView::Base and put it into
ActionView::Template.
I am guessing Liquid will need to be updated accordingly.
Thanks so much for a cool project!
-Chris
Original issue reported on code.google.com by [email protected]
on 19 Mar 2008 at 9:30
I've switched over the filter collection to a hash keyed by name so that it
won't keep adding over
and over.
Not a leak in the classical sense, but still fills up plenty fast. RSS was
growing by 20ish meg every
100 requests or so. (I suspect there are other leaks in this client's codebase,
but this was the biggie)
Original issue reported on code.google.com by [email protected]
on 1 Oct 2007 at 8:23
Attachments:
The attached patch file is a svn diff based off of the following svn info:
URL: http://liquid-markup.googlecode.com/svn/trunk
Repository Root: http://liquid-markup.googlecode.com/svn
Repository UUID: 6236ed23-6a31-0410-84af-1fc73436fe80
Last Changed Author: tobias.luetke
Last Changed Rev: 20
Last Changed Date: 2008-04-25 18:18:21 -0400 (Fri, 25 Apr 2008)
The patch encapsulates errors raised by the Liquid plugin by namespacing
all raised errors under a common Liquid::Error < StandardError class. This
class is extended to Liquid::ArgumentError, Liquid::SyntaxError,
Liquid::ContextError, etc. as seen in errors.rb. This encapsulation will
allow developers to more easily catch and isolate problems raised from
within the plugin.
Further, while writing this patch, I noticed two things with the existing
code base (while I don't want to monkey patch, these changes seemed well
within the scope of this patch):
1. The Condition model referenced a non-existent variable/method "name" in
the interpret_condition method. This, of course, raised an unexpected
error. I added a test to exercise that portion of code and show the
problem, then I removed the 'name' reference as it seemed unnecessary.
2. I changed the error raised by the Strainer model in global_filter to
raise an ArgumentError instead of a StandardError, as it seemed more
descriptive of the problem.
So, in summary, any error raised from within the plugin, with this patch,
can be caught with a simple and generic rescue Liquid::Error. More
detailed errors are raised, but they are all children of the overall
Liquid::Error and could be similarly caught if one desires.
Original issue reported on code.google.com by [email protected]
on 2 May 2008 at 9:03
Attachments:
Normally one could check out the source of a gem, and do a sudo gem install, as
long as that gem's
using hoe.
Liquid seems to be using hoe, but hoe's rake tasks won't run because the
checkout is missing
several files - specifically README.txt and History.txt - without them created
and properly filled
out, hoe's rake tasks won't run, which means I can't install the edge liquid
gem.
This is especially annoying because the released gem is getting quite out of
date at this point.
Original issue reported on code.google.com by [email protected]
on 6 Feb 2008 at 10:27
The download release link on
http://www.liquidmarkup.org/
links to
http://rubyforge.org/frs/?group_id=1070
it should link to
http://rubyforge.org/frs/?group_id=1069
Original issue reported on code.google.com by [email protected]
on 13 Feb 2008 at 7:55
Are we likely to see arrays or hashes as available data types in 'assign' any
time soon? Hashes I can
understand being difficult, but assigning a list of items to a variable, so
one can later use them in a
for loop, seems like something that would be essential to have.
Original issue reported on code.google.com by [email protected]
on 6 Feb 2008 at 11:18
Because all hashes passed to liquid are string based there should be no
reason hyphens cannot be used as variable names.
Original issue reported on code.google.com by [email protected]
on 3 Feb 2008 at 4:26
Including a template from itself will cause an infinite loop and take out your
Rails server.
Original issue reported on code.google.com by [email protected]
on 31 Jan 2008 at 1:32
Index: vendor/plugins/liquid/lib/liquid/context.rb
===========================================================
========
--- vendor/plugins/liquid/lib/liquid/context.rb (revision 697)
+++ vendor/plugins/liquid/lib/liquid/context.rb (working copy)
@@ -129,6 +129,8 @@
true
when 'false'
false
+ when 'blank'
+ :blank?
when 'empty'
:empty?
# Single quoted strings
Original issue reported on code.google.com by [email protected]
on 31 Jan 2008 at 1:31
With Liquid at r11, I can cause ERB errors with the following template:
<% [:a, :b].each do |t| %>
<%= t.to_s %>
## NOTICE I didn't put the end, which would usually be needed.
This is a major security hole, as Liquid touts itself as non-evaling.
Original issue reported on code.google.com by [email protected]
on 16 Jan 2008 at 8:50
Here's my quite simple test code:
http://p.ramaze.net/442
Line 8, and it outputs this:
<p>Hello, <em>ELLIOTT</em>! (That’s elliott characters, by the way)</p>
It's printing the text straight out, instead of the length...
Original issue reported on code.google.com by [email protected]
on 6 Feb 2008 at 10:13
We're using Liquid to render some emails using ActionMailer, the problem
we're having is that our emails come out of Liquid rather stretched; more
newlines than we would like. The issue is that Liquid simply removes the
Tag expressions and leaves whatever else was on the line in place. For HTML
this is fine, but for a text email, we end up with a single newline
character and therefore a stretched looking email. The attached hack^Wpatch
simply attempts to swallow a single newline after a TagEnd (both \n or \r\n).
Cheers
Original issue reported on code.google.com by [email protected]
on 27 Jun 2007 at 4:39
Attachments:
Attached the patch to implement the extension to use regular objects as
drops.
Regards
Domizio
Original issue reported on code.google.com by [email protected]
on 7 Jul 2007 at 12:53
Attachments:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.