model_formatting 0.2.3.18.1 → 0.2.3.18.2
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +1 -1
- data/lib/redcarpet_custom.rb +1 -1
- data/test/model_formatting_test.rb +1 -1
- metadata +4 -4
data/Rakefile
CHANGED
data/lib/redcarpet_custom.rb
CHANGED
@@ -21,7 +21,7 @@ module Redcarpet::Render
|
|
21
21
|
end
|
22
22
|
end
|
23
23
|
@headers << permalink
|
24
|
-
%(\n<a name="#{permalink}" class="anchor" href="##{permalink}"
|
24
|
+
%(\n<h#{level} id=\"#{permalink}\"><a name="#{permalink}" class="anchor" href="##{permalink}"></a>#{title}</h#{level}>\n)
|
25
25
|
end
|
26
26
|
end
|
27
27
|
end
|
@@ -10,7 +10,7 @@ class ModelFormattingTest < Test::Unit::TestCase
|
|
10
10
|
|
11
11
|
it "generates TOC titles" do
|
12
12
|
ModelFormatting.process(:html, "# title one\n\n# title two\n\n## title one").should == \
|
13
|
-
|
13
|
+
"<div><h1 id=\"title-one\"><a name=\"title-one\" class=\"anchor\" href=\n\"#title-one\" id=\"title-one\"></a>title one</h1>\n<h1 id=\"title-two\"><a name=\"title-two\" class=\"anchor\" href=\n\"#title-two\" id=\"title-two\"></a>title two</h1>\n<h2 id=\"title-one_1\"><a name=\"title-one_1\" class=\"anchor\" href=\n\"#title-one_1\" id=\"title-one_1\"></a>title one</h2></div>"
|
14
14
|
end
|
15
15
|
|
16
16
|
it "parses empty code block into array of single CodeBlock" do
|
metadata
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: model_formatting
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 203
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 2
|
9
9
|
- 3
|
10
10
|
- 18
|
11
|
-
-
|
12
|
-
version: 0.2.3.18.
|
11
|
+
- 2
|
12
|
+
version: 0.2.3.18.2
|
13
13
|
platform: ruby
|
14
14
|
authors:
|
15
15
|
- ENTP
|
@@ -17,7 +17,7 @@ autorequire:
|
|
17
17
|
bindir: bin
|
18
18
|
cert_chain: []
|
19
19
|
|
20
|
-
date: 2013-04-
|
20
|
+
date: 2013-04-25 00:00:00 Z
|
21
21
|
dependencies:
|
22
22
|
- !ruby/object:Gem::Dependency
|
23
23
|
version_requirements: &id001 !ruby/object:Gem::Requirement
|