Skip to content

Commit

Permalink
Remove whitespace when linebreaking quoted attributes. Closes #685
Browse files Browse the repository at this point in the history
  • Loading branch information
cjford committed Aug 23, 2016
1 parent 17dd4a0 commit 6609bf6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -463,8 +463,8 @@ a href=="&"
You can break quoted attributes with backslash `\`
~~~ slim
a data-title="help" data-content="extremely long help text that goes on\
and one and one and then starts over...."
a data-title="help" data-content="extremely long help text that goes on \
and on and on and then starts over...."
~~~
#### Ruby attributes
Expand Down
2 changes: 1 addition & 1 deletion lib/slim/parser.rb
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,7 @@ def parse_quoted_attribute(quote)

until count == 0 && @line[0] == quote[0]
if @line =~ /\A(\\)?\Z/
value << ($1 ? ' ' : "\n")
value << ($1 ? '' : "\n")
expect_next_line
else
if @line[0] == ?{
Expand Down

0 comments on commit 6609bf6

Please sign in to comment.