1
0
Fork 0
mirror of https://github.com/haml/haml.git synced 2022-11-09 12:33:31 -05:00

[Haml] [HTML] Generate = succeed, not - succeed.

This commit is contained in:
Nathan Weizenbaum 2010-05-31 16:04:45 -07:00
parent 675d74ede9
commit a2ce8a9c27
3 changed files with 7 additions and 2 deletions

View file

@ -23,6 +23,11 @@ and only falls back to `"utf-8"` if this encoding is `"us-ascii"`.
when running under Rails 3,
since it defaults to HTML5 as well.
### Bug Fixes
* When generating Haml for something like `<span>foo</span>,`,
use `= succeed` rather than `- succeed` (which doesn't work).
## 3.0.6
[Tagged on GitHub](http://github.com/nex3/haml/commit/3.0.6).

View file

@ -285,7 +285,7 @@ module Haml
self.previous.content =~ /\A\s*\Z/ && self.previous.previous.nil?)
nuke_outer_whitespace = true
else
output << "- succeed #{self.next.content.slice!(/\A[^\s]+/).dump} do\n"
output << "= succeed #{self.next.content.slice!(/\A[^\s]+/).dump} do\n"
tabs += 1
output << tabulate(tabs)
end

View file

@ -268,7 +268,7 @@ HTML
assert_equal(<<HAML.rstrip, render(<<HTML))
#foo
Batch
- succeed "," do
= succeed "," do
%span Foo
%span Bar
HAML