livingstyleguide 0.5.0 → 0.5.1
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 13d4d67aff5436433e7fbb5fc6f12d4e61e590e4
|
4
|
+
data.tar.gz: b48543efd1725a37b82a6cc0cd528d9dc5838c89
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 36666790605e6a56db4453b4d83f652e472e036524025da2800fb79635468b57d3b0355c86cd6a5f3bae9f5865ab80eaf192fd356e13f79cdd5bef2b26e47db8
|
7
|
+
data.tar.gz: 455f1cdb1707f0be48322705d709add0009c5792d6bde3496b74bfb9abfbe3f88e55a5ea48ba8a9adeb3ee0f27911cbb5004d71f7c161249f23b8d63b5b3523c
|
data/CHANGELOG.md
CHANGED
@@ -93,8 +93,9 @@ module LivingStyleGuide
|
|
93
93
|
type = language[5..-1]
|
94
94
|
require 'haml'
|
95
95
|
Haml::Options.defaults[:attr_wrapper] = '"'
|
96
|
-
|
97
|
-
|
96
|
+
haml = code.gsub(/\*\*\*(.+?)\*\*\*/m, '\\1')
|
97
|
+
html = Haml::Engine.new(haml).render.strip
|
98
|
+
%Q(<div class="livingstyleguide--#{type}">\n #{html}\n</div>) + "\n" + block_code(code, 'haml')
|
98
99
|
rescue LoadError
|
99
100
|
raise "Please make sure `gem 'haml'` is added to your Gemfile."
|
100
101
|
end
|
@@ -38,7 +38,16 @@ class MarkdownTest < Test::Unit::TestCase
|
|
38
38
|
<div class="livingstyleguide--example">
|
39
39
|
<button class="button">Test</button>
|
40
40
|
</div>
|
41
|
-
<pre class="livingstyleguide--code-block"><code class="livingstyleguide--code">%button
|
41
|
+
<pre class="livingstyleguide--code-block"><code class="livingstyleguide--code"><em>%button</em>.button Test</code></pre>
|
42
|
+
HTML
|
43
|
+
end
|
44
|
+
|
45
|
+
def test_haml_example_with_highlight
|
46
|
+
assert_markdown <<-HTML, 'haml-example-with-highlight.md'
|
47
|
+
<div class="livingstyleguide--example">
|
48
|
+
<button class="button">Test</button>
|
49
|
+
</div>
|
50
|
+
<pre class="livingstyleguide--code-block"><code class="livingstyleguide--code"><em>%button</em><strong class="livingstyleguide--code-highlight">.button</strong> Test</code></pre>
|
42
51
|
HTML
|
43
52
|
end
|
44
53
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: livingstyleguide
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nico Hagenburger
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-11-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: minisyntax
|
@@ -142,6 +142,7 @@ files:
|
|
142
142
|
- test/fixtures/markdown/example-with-highlight.md
|
143
143
|
- test/fixtures/markdown/example.md
|
144
144
|
- test/fixtures/markdown/font-example.md
|
145
|
+
- test/fixtures/markdown/haml-example-with-highlight.md
|
145
146
|
- test/fixtures/markdown/haml-example.md
|
146
147
|
- test/fixtures/markdown/javascript-example.md
|
147
148
|
- test/fixtures/markdown/layout-example.md
|
@@ -184,6 +185,7 @@ test_files:
|
|
184
185
|
- test/fixtures/markdown/example-with-highlight.md
|
185
186
|
- test/fixtures/markdown/example.md
|
186
187
|
- test/fixtures/markdown/font-example.md
|
188
|
+
- test/fixtures/markdown/haml-example-with-highlight.md
|
187
189
|
- test/fixtures/markdown/haml-example.md
|
188
190
|
- test/fixtures/markdown/javascript-example.md
|
189
191
|
- test/fixtures/markdown/layout-example.md
|