Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixes for :text style printing and embedding raw content
- Loading branch information
1 parent
ba954b8
commit 76aa858
Showing
5 changed files
with
62 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
spec/integration/expectations/render_styles/pretty_with_embeds.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | ||
<html> | ||
<head> | ||
<script type="text/javascript"> | ||
alert("foo"); | ||
alert("bar"); | ||
var foo = 'foo'; | ||
</script> | ||
<style type="text/css"> | ||
body { background-color: blue;} | ||
p { background-color: white;} | ||
</style> | ||
</head> | ||
<body> | ||
<p> | ||
Style me up! | ||
</p> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
You should check out my rad new site:<br> <a class="user_generated_link" | ||
href="http://foo.com">http://foo.com</a><br> It will blow your mind! | ||
You should check out my rad new site:<br> | ||
<a class="user_generated_link" href="http://foo.com">http://foo.com</a><br> | ||
It will blow your mind! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
class PrettyWithEmbeds < Garterbelt::Page | ||
def head | ||
script 'type' => 'text/javascript' do | ||
[ | ||
'alert("foo");', | ||
"alert(\"bar\");\nvar foo = 'foo';" | ||
].each do |js| | ||
raw_text js | ||
end | ||
end | ||
|
||
style 'type' => 'text/css' do | ||
[ | ||
"body { background-color: blue;}", | ||
"p { background-color: white;}" | ||
].each do |css| | ||
raw_text css | ||
end | ||
end | ||
end | ||
|
||
def body | ||
p "Style me up!" | ||
end | ||
end |