Skip to content

Commit

Permalink
fix(copy-button): do not include whitespace in hologram templates
Browse files Browse the repository at this point in the history
[Finishes #79279548]

Signed-off-by: Paul Meskers <pmeskers@pivotal.io>
  • Loading branch information
bebepeng authored and Paul Meskers committed Jan 5, 2015
1 parent 935400f commit f6f067a
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 21 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
source 'https://rubygems.org'

gem 'hologram', git: 'https://github.com/gpleiss/hologram.git', branch: 'develop'
gem 'hologram', git: 'https://github.com/gpleiss/hologram.git', branch: 'custom_code_example'
gem 'haml'
gem 'sass'
gem 'compass', '~> 1.0.1'
Expand Down
4 changes: 2 additions & 2 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
GIT
remote: https://github.com/gpleiss/hologram.git
revision: 9ba6fe0e493f67ad3c6834bcf788fcc860f86916
branch: develop
revision: 2b156bd2afd7b09e23645d29dab0d1badd9cb6d1
branch: custom_code_example
specs:
hologram (1.2.0)
redcarpet (>= 2.2, < 4.0)
Expand Down
4 changes: 1 addition & 3 deletions hologram/code_example_templates/js_example_template.html.erb
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
<script><%= rendered_example %></script>
<div class="codeBlock jsExample">
<div class="highlight" data-code-to-copy>
<pre>
<%= code_example %>
</pre>
<pre><%= code_example %></pre>
</div>
<button class="btn btn-default btn-copy" data-btn-copy data-placement="left">
Copy
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
<script type='text/jsx'><%= rendered_example %></script>
<div class="codeBlock jsExample">
<div class="highlight" data-code-to-copy>
<pre>
<%= code_example %>
</pre>
<pre><%= code_example %></pre>
</div>
<button class="btn btn-default btn-copy" data-btn-copy data-placement="left">
Copy
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
<div class="codeExample">
<div class="exampleOutput">
<%= rendered_example %>
</div>
<div class="exampleOutput"><%= rendered_example %></div>
<div class="codeBlock">
<div class="highlight" data-code-to-copy>
<pre>
<%= code_example %>
</pre>
<pre><%= code_example %></pre>
</div>
<button class="btn btn-default btn-copy" data-btn-copy data-placement="left">
Copy
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,12 @@
<% examples.each do |example| %>
<tr>
<th>
<div class="exampleOutput">
<%= example.rendered_example %>
</div>
<div class="exampleOutput"><%= example.rendered_example %></div>
</th>
<td>
<div class="codeBlock">
<div class="highlight" data-code-to-copy>
<pre>
<%= example.code_example %>
</pre>
<pre><%= example.code_example %></pre>
</div>
</div>
<button class="btn btn-default btn-copy" data-btn-copy data-placement="left">
Expand Down

0 comments on commit f6f067a

Please sign in to comment.