simple_markdown 0.3.1 → 0.3.2
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.
- checksums.yaml +4 -4
- data/lib/simple_markdown/action_view/helpers.rb +35 -19
- data/lib/simple_markdown/version.rb +1 -1
- data/test/dummy/log/test.log +4082 -0
- data/test/simple_markdown_test.rb +11 -2
- metadata +11 -11
@@ -23,6 +23,10 @@ class SimpleMarkdownTest < ActiveSupport::TestCase # ActionView::TestCase
|
|
23
23
|
assert_equal "", simple_markdown("\n\n\n")
|
24
24
|
end
|
25
25
|
|
26
|
+
test "empty paragraph" do
|
27
|
+
assert_equal"<p>\n \n</p>", simple_markdown("\n \n")
|
28
|
+
end
|
29
|
+
|
26
30
|
test "paragraph" do
|
27
31
|
assert_equal "<p>\nText\n</p>", simple_markdown("Text")
|
28
32
|
end
|
@@ -82,11 +86,16 @@ class SimpleMarkdownTest < ActiveSupport::TestCase # ActionView::TestCase
|
|
82
86
|
|
83
87
|
test "flex block" do
|
84
88
|
assert_equal "<div style=\"display:flex; justify-content:space-between; align-items: flex-start;\">\n<div>\n<p>\nThis is text\n</p>\n</div><div>\n<p>\nThis is text\n</p>\n</div>\n</div>",
|
85
|
-
simple_markdown("[
|
89
|
+
simple_markdown("[2-flex]\nThis is text\n\n[flex]\nThis is text\n\n[flex]")
|
86
90
|
end
|
87
91
|
|
88
92
|
test "flex block with space specified" do
|
89
93
|
# skip("flex block is in WIP")
|
94
|
+
assert_equal "<div style=\"display:flex; justify-content:space-between; align-items: flex-start;\">\n<div style=\"flex:1;\">\n<p>\nThis is text\n</p>\n</div><div style=\"flex:3;\">\n<p>\nThis is text\n</p>\n</div>\n</div>",
|
95
|
+
simple_markdown("[2-flex-1]\nThis is text\n\n[flex-3]\nThis is text\n\n[flex]")
|
96
|
+
end
|
97
|
+
|
98
|
+
test "flex should work without '-'" do
|
90
99
|
assert_equal "<div style=\"display:flex; justify-content:space-between; align-items: flex-start;\">\n<div style=\"flex:1;\">\n<p>\nThis is text\n</p>\n</div><div style=\"flex:3;\">\n<p>\nThis is text\n</p>\n</div>\n</div>",
|
91
100
|
simple_markdown("[2flex1]\nThis is text\n\n[flex3]\nThis is text\n\n[flex]")
|
92
101
|
end
|
@@ -105,7 +114,7 @@ class SimpleMarkdownTest < ActiveSupport::TestCase # ActionView::TestCase
|
|
105
114
|
end
|
106
115
|
|
107
116
|
test "center a flex" do
|
108
|
-
assert_equal "<center>\n<div style=\"display:flex; justify-content:space-between; align-items: flex-start;\">\n<div>\n<p>\nText\n</p>\n</div>\n</div>\n</center><p>\nText\n</p>", simple_markdown("->\n\n[
|
117
|
+
assert_equal "<center>\n<div style=\"display:flex; justify-content:space-between; align-items: flex-start;\">\n<div>\n<p>\nText\n</p>\n</div>\n</div>\n</center><p>\nText\n</p>", simple_markdown("->\n\n[1-flex]\n\nText\n\n[flex]\n\n<-\n\nText")
|
109
118
|
end
|
110
119
|
|
111
120
|
test "center a title" do
|
metadata
CHANGED
@@ -1,55 +1,55 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: simple_markdown
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Noémien Kocher
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-05-
|
11
|
+
date: 2015-05-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: 4.2.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: 4.2.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: sqlite3
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: 1.3.10
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: 1.3.10
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: coveralls
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- -
|
45
|
+
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '0'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- -
|
52
|
+
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
55
|
description: Given a markdown formated text, transforms it to html via a simple method
|
@@ -136,17 +136,17 @@ require_paths:
|
|
136
136
|
- lib
|
137
137
|
required_ruby_version: !ruby/object:Gem::Requirement
|
138
138
|
requirements:
|
139
|
-
- -
|
139
|
+
- - ">="
|
140
140
|
- !ruby/object:Gem::Version
|
141
141
|
version: '0'
|
142
142
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
143
143
|
requirements:
|
144
|
-
- -
|
144
|
+
- - ">="
|
145
145
|
- !ruby/object:Gem::Version
|
146
146
|
version: '0'
|
147
147
|
requirements: []
|
148
148
|
rubyforge_project:
|
149
|
-
rubygems_version: 2.4.
|
149
|
+
rubygems_version: 2.4.3
|
150
150
|
signing_key:
|
151
151
|
specification_version: 4
|
152
152
|
summary: Add `simple_markdown` method to your rails app. It will parse markdown to
|