Permalink
Commits on Mar 21, 2013
  1. Merge pull request #649 from haml/preserve-pattern-regex

    norman committed Mar 21, 2013
    Fix preserve_pattern regex in buffer.rb
Commits on Mar 10, 2013
  1. Fix preserve_pattern regex in buffer.rb

    mattwildig committed Mar 10, 2013
    Group preserved tag names to reduce false positives.
Commits on Feb 13, 2013
  1. Bump version, update changelog

    norman committed Feb 13, 2013
Commits on Oct 18, 2012
  1. Render ; instead of \n when multiple blocks end

    Grant Hutchins & Sabrina Staedt
    Grant Hutchins & Sabrina Staedt committed Oct 18, 2012
    That way the source line number matches the haml input.
  2. Failing spec for line numbers after nested blocks

    Grant Hutchins & Sabrina Staedt
    Grant Hutchins & Sabrina Staedt committed Oct 18, 2012
  3. Test line numbers in Rubies other than 1.8

    Grant Hutchins & Sabrina Staedt
    Grant Hutchins & Sabrina Staedt committed Oct 18, 2012
Commits on Aug 12, 2012
  1. Updated changelog

    norman committed Aug 12, 2012
  2. Merge pull request #582 from totallymike/3-1-sass-version-fix

    norman committed Aug 12, 2012
    Changed version check of Haml::Util::try_sass
Commits on Aug 11, 2012
  1. Updated VERSION to allow for new gems to be built.

    Michael Westbom
    Michael Westbom committed Aug 11, 2012
    Won't conflict with 3.1.6 gems already installed.
  2. Changed version check of Haml::Util::try_sass

    Michael Westbom
    Michael Westbom committed Aug 11, 2012
    try_sass now looks for any version with a major revision of 3,
    minor revision greater than or equal to 1
    
    Prior it would look only for versions with major revisions greater than
    3, or specifically 3.1.  This caused the current sass in rubygems to
    fail, being 3.2.0.
Commits on May 16, 2012
  1. Bumped version to 3.1.6

    norman committed May 16, 2012
Commits on May 14, 2012
  1. Bump version to 3.1.6.rc.1

    norman committed May 14, 2012
    If you are affected by any of the issues raised in #532, #519, #516, #506,
    or #503 then please give try this version.
Commits on May 11, 2012
  1. Updated Changelog

    norman committed May 11, 2012
  2. Don't adjust whitespace if buffer has preserve tag

    norman committed May 11, 2012
    This is in references to various issues on Github, including:
    
    Issue #532, #519, #516, #506, and #503.
    
    Recently I released 3.1.5 to work around a change in Rails 3.2.3 which
    made textarea helpers append newlines to the opening tag. Rails's
    motivation for this change was to fix a longstanding bug which impeded
    the ability to save texarea content with leading newlines.
    
    Unfortunately, Haml 3.1.4 treated this newline as content, rather than
    as a seperator between the textarea tag and its content.
    
    Solving the issue was not simply a matter of decoding the newline,
    because in indented mode, Haml would add spaces before the newline in
    partials, making nested textareas have spaces before their content.
    
    Haml 3.1.5 solved this by adding <haml:newline/> rather than a newline,
    and monkeypatched Rails to replace it with a real newline after the
    document was rendered. You ever do something you just *know* is going to
    cause problems, even though all your tests seem to indicate things are
    working fine? Yeah, I know that feeling.
    
    As it turns out, monkeypatching the Rails does the actual
    rendering is not as easy as it seems. First, because there are several
    places where a monkey patch needs to be applied. Second, because those
    modules are not always loaded, and it's not very nice to force people to
    load them in order to use Haml: an application may have a very good
    reason not to have loaded part of Rails.
    
    Last but not least, the monkeypatch caused <haml:newline/> to appear in
    some Erb documents when the haml gem was loaded for use elsewhere in the
    applcation.
    
    This commit attempts to make a simpler and wiser solution to the issue.
    Rather than adding some silly tag (WTF was I thinking???), this simple
    makes Haml replace the first encoded newline emitted by Rails's textarea
    helper methods with a real newline. Then, when rending the Haml
    document in ugly mode, everything works exactly as you would expect,
    with no need to monkepatch Rails's template rendering.
    
    However this comes with a tradeoff: in order to not completely break
    textareas in indented mode, Haml will now make no attempt to reindent a
    partials or the output of helpers when they match a very simple regular
    expression for opening <textarea>, <pre>, or <code> tags.
    
    This makes textareas work properly in Haml 3.1.6. at the expense of
    slightly uglier documents, when those documents contain the listed tags.
    
    Now, everybody knows that you shouldn't rely on regular expressions to
    parse HTML. This is where another tradeoff comes in: parsing the buffer
    with an XML parser would have a much larger impact on performance, and
    Haml is already slow enough as it stands in indented mode. So I've
    compromised and used a simple, somewhat braindead, but fast regexp.
    
    This issue has been nagging and annoying, and I apologize to anybody
    affected by this, most especially for the <haml:newline/> silliness in
    introduced in 3.1.5. Please give Haml 3.1.6 a try (it's currently in the
    stable branch) and let me know if you come across any problems. I'll try
    to get this release out as soon as possible.
    
    The change is also in the master branch, for those who like to live
    dangerously.
Commits on May 8, 2012
  1. Require "abstract_controller/rendering" before monkeypatching.

    norman committed May 8, 2012
    See issues #529 and #519.
    
    If users create a mimimal Rails stack this module may not be have been
    loaded.
    
    I'm less than  happy about making Haml require this module, it seems
    that if people didn't want to require it in the first place, Haml
    shouldn't do it. A better solution than the <haml:newline/> hack would
    attack this problem at the root, but for now this should at least solve
    the most immediate issue.
Commits on May 7, 2012
  1. Bump version to 3.1.5

    norman committed May 7, 2012
Commits on May 1, 2012
  1. Moved site to haml.info

    norman committed May 1, 2012
  2. Bump from beta to rc

    norman committed May 1, 2012
Commits on Apr 30, 2012
  1. Merge branch '315' into stable

    norman committed Apr 30, 2012
  2. Updated repo location

    norman committed Apr 30, 2012
Commits on Apr 27, 2012
  1. Add beta to version

    norman committed Apr 27, 2012
  2. Add myself to gemspec

    norman committed Apr 27, 2012
Commits on Apr 26, 2012
  1. Fix for Rails 3.2.3 textarea helpers

    norman committed Apr 17, 2012
    Textarea helpers on 3.2.3 emit a newline after the opening textarea tag,
    which caused Haml to mess up indenting and add an encoded newline to the
    textarea content. This fixes the issue by replacing the first newline
    with <haml:newline/> in the Haml buffer, and then changing it to a true
    newline at render time.
Commits on Apr 24, 2012
  1. Bump version to 3.1.5

    norman committed Apr 17, 2012
Commits on Apr 17, 2012
  1. Added Gemfiles for Rails 3.2.x

    norman committed Apr 13, 2012
  2. Updated Rails 3.1.x deps

    norman committed Apr 13, 2012
Commits on Dec 16, 2011
  1. Attribute escaping respects html_safe.

    Gerad Suyderhoud authored and nex3 committed Dec 13, 2011
    It's sometimes the case where we don't want attributes to be
    html_escaped... for instance `%input{ placeholder: 'Filter&hellip;' }`.
    
    This commit changes the attribute escaping to respect the rails
    `html_safe` flag and not escape attributes when `.html_safe` is
    explicitly called on them.
    
    Closes #470
Commits on Nov 28, 2011
  1. Fix rake:revision_file.

    nex3 committed Nov 28, 2011
  2. Bump VERSION to 3.1.4.

    nex3 committed Nov 28, 2011
  3. Update vendored Sass.

    nex3 committed Nov 28, 2011
    Closes gh-447
Commits on Nov 24, 2011
  1. Fix a weird indentation bug.

    nex3 committed Nov 24, 2011
    Closes gh-424
Commits on Nov 15, 2011