model_formatting 0.2.3.18.3 → 0.2.3.18.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/Rakefile +1 -1
- data/lib/redcarpet_custom.rb +1 -1
- data/test/model_formatting_test.rb +2 -2
- metadata +3 -3
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
|
@@ -9,8 +9,8 @@ class ModelFormattingTest < Test::Unit::TestCase
|
|
9
9
|
end
|
10
10
|
|
11
11
|
it "generates TOC titles" do
|
12
|
-
ModelFormatting.process(:html, "#
|
13
|
-
|
12
|
+
ModelFormatting.process(:html, "# Title One\n\n# Title Two\n\n## Title One").should == \
|
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: 199
|
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
|
+
- 4
|
12
|
+
version: 0.2.3.18.4
|
13
13
|
platform: ruby
|
14
14
|
authors:
|
15
15
|
- ENTP
|