Code Monkey home page Code Monkey logo

liquid-markup's People

Stargazers

 avatar

Watchers

 avatar

liquid-markup's Issues

[PATCH] Raise on incomplete closing variable braces.

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:

ActionView template handling has been completely reorganized...

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

"Memory leak" in Strainer.global_filter

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:

Error encapsulation and an error in Condition

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:

Cannot build from source

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

bad download link on homepage

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

arrays / hashes?

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

Liquid should include "blank" in context evals.

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

ERB code within the template causes evaluation of said code

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

length tag as described in docs doesn't work

Here's my quite simple test code:
http://p.ramaze.net/442

Line 8, and it outputs this:
<p>Hello, <em>ELLIOTT</em>! (That&#8217;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

Swallow single newline after TagEnd

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:

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.