md2hiki 0.0.1 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/README.md +3 -3
- data/Rakefile +8 -0
- data/lib/md2hiki/version.rb +1 -1
- data/lib/redcarpet/render/hiki.rb +1 -1
- data/md2hiki.gemspec +2 -1
- data/test/hiki_test.rb +39 -0
- metadata +36 -29
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: c6b84b8154d0111e8f6d374171c25e6df5007143de4ec90ef04e5d077214dfa1
|
4
|
+
data.tar.gz: ed7fc5565a86572aaf9c188fb388039e55b92022488d8946b888c3fc243a8bf3
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: e94a47a46f759dbc62141fd8a41b4595e420d547b2483a07d23d7a1a363186754bf7997b934cc68e6902062089f8174a5992567551b06c2b5cc15d144cd9b569
|
7
|
+
data.tar.gz: e8f97ef38de26f506a248352c057908dbe712c8089dc3d0a793cec754a6754834ec8f2d0b04d9cbc63fb976bbb330bc8acc9869c7f258df8e6005cd3dcbdfac5
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
#
|
1
|
+
# md2hiki
|
2
2
|
|
3
|
-
|
3
|
+
md2hiki is a markup converter, from Markdown to Hiki(https://github.com/hiki/hikidoc) format.
|
4
4
|
|
5
5
|
## Installation
|
6
6
|
|
@@ -18,7 +18,7 @@ Or install it yourself as:
|
|
18
18
|
|
19
19
|
## Usage
|
20
20
|
|
21
|
-
|
21
|
+
$ md2hiki foo.md > foo.hiki
|
22
22
|
|
23
23
|
## Contributing
|
24
24
|
|
data/Rakefile
CHANGED
data/lib/md2hiki/version.rb
CHANGED
data/md2hiki.gemspec
CHANGED
@@ -20,6 +20,7 @@ Gem::Specification.new do |spec|
|
|
20
20
|
|
21
21
|
spec.add_dependency 'redcarpet', '>2.0.0'
|
22
22
|
|
23
|
-
spec.add_development_dependency "bundler"
|
23
|
+
spec.add_development_dependency "bundler"
|
24
24
|
spec.add_development_dependency "rake"
|
25
|
+
spec.add_development_dependency "test-unit"
|
25
26
|
end
|
data/test/hiki_test.rb
ADDED
@@ -0,0 +1,39 @@
|
|
1
|
+
# coding: UTF-8
|
2
|
+
rootdir = File.dirname(File.dirname(__FILE__))
|
3
|
+
$LOAD_PATH.unshift "#{rootdir}/lib"
|
4
|
+
|
5
|
+
if defined? Encoding
|
6
|
+
Encoding.default_internal = 'UTF-8'
|
7
|
+
end
|
8
|
+
|
9
|
+
require 'test/unit'
|
10
|
+
require 'redcarpet'
|
11
|
+
require 'redcarpet/render/hiki'
|
12
|
+
|
13
|
+
class HikiTest < Test::Unit::TestCase
|
14
|
+
|
15
|
+
def setup
|
16
|
+
@markdown = Redcarpet::Markdown.new(Redcarpet::Render::Hiki.new({}))
|
17
|
+
end
|
18
|
+
|
19
|
+
def render_with(flags, text)
|
20
|
+
Redcarpet::Markdown.new(Redcarpet::Render::Hiki, flags).render(text)
|
21
|
+
end
|
22
|
+
|
23
|
+
def test_that_simple_one_liner_goes_to_review
|
24
|
+
assert_respond_to @markdown, :render
|
25
|
+
assert_equal "\n\nHello World.\n", @markdown.render("Hello World.")
|
26
|
+
end
|
27
|
+
|
28
|
+
def test_href
|
29
|
+
assert_respond_to @markdown, :render
|
30
|
+
assert_equal "\n\n[[example|http://exmaple.com]]\n", @markdown.render("[example](http://exmaple.com)\n")
|
31
|
+
end
|
32
|
+
|
33
|
+
def test_header
|
34
|
+
assert_respond_to @markdown, :render
|
35
|
+
assert_equal "\n! AAA\n\n\nBBB\n\n!! ccc\n\n\nddd\n", @markdown.render("#AAA\nBBB\n\n##ccc\n\nddd\n")
|
36
|
+
end
|
37
|
+
|
38
|
+
|
39
|
+
end
|
metadata
CHANGED
@@ -1,62 +1,69 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: md2hiki
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
5
|
-
prerelease:
|
4
|
+
version: 0.5.0
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- takahashim
|
9
|
-
autorequire:
|
8
|
+
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date:
|
11
|
+
date: 2022-01-25 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: redcarpet
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
16
|
requirements:
|
19
|
-
- -
|
17
|
+
- - ">"
|
20
18
|
- !ruby/object:Gem::Version
|
21
19
|
version: 2.0.0
|
22
20
|
type: :runtime
|
23
21
|
prerelease: false
|
24
22
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
23
|
requirements:
|
27
|
-
- -
|
24
|
+
- - ">"
|
28
25
|
- !ruby/object:Gem::Version
|
29
26
|
version: 2.0.0
|
30
27
|
- !ruby/object:Gem::Dependency
|
31
28
|
name: bundler
|
32
29
|
requirement: !ruby/object:Gem::Requirement
|
33
|
-
none: false
|
34
30
|
requirements:
|
35
|
-
- -
|
31
|
+
- - ">="
|
36
32
|
- !ruby/object:Gem::Version
|
37
|
-
version: '
|
33
|
+
version: '0'
|
38
34
|
type: :development
|
39
35
|
prerelease: false
|
40
36
|
version_requirements: !ruby/object:Gem::Requirement
|
41
|
-
none: false
|
42
37
|
requirements:
|
43
|
-
- -
|
38
|
+
- - ">="
|
44
39
|
- !ruby/object:Gem::Version
|
45
|
-
version: '
|
40
|
+
version: '0'
|
46
41
|
- !ruby/object:Gem::Dependency
|
47
42
|
name: rake
|
48
43
|
requirement: !ruby/object:Gem::Requirement
|
49
|
-
none: false
|
50
44
|
requirements:
|
51
|
-
- -
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: test-unit
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
52
60
|
- !ruby/object:Gem::Version
|
53
61
|
version: '0'
|
54
62
|
type: :development
|
55
63
|
prerelease: false
|
56
64
|
version_requirements: !ruby/object:Gem::Requirement
|
57
|
-
none: false
|
58
65
|
requirements:
|
59
|
-
- -
|
66
|
+
- - ">="
|
60
67
|
- !ruby/object:Gem::Version
|
61
68
|
version: '0'
|
62
69
|
description: md2hiki is a Markdown to Hiki converter using redcarpet
|
@@ -67,7 +74,7 @@ executables:
|
|
67
74
|
extensions: []
|
68
75
|
extra_rdoc_files: []
|
69
76
|
files:
|
70
|
-
- .gitignore
|
77
|
+
- ".gitignore"
|
71
78
|
- Gemfile
|
72
79
|
- LICENSE.txt
|
73
80
|
- README.md
|
@@ -77,29 +84,29 @@ files:
|
|
77
84
|
- lib/md2hiki/version.rb
|
78
85
|
- lib/redcarpet/render/hiki.rb
|
79
86
|
- md2hiki.gemspec
|
87
|
+
- test/hiki_test.rb
|
80
88
|
homepage: https://github.com/takahashim/md2hiki
|
81
89
|
licenses:
|
82
90
|
- MIT
|
83
|
-
|
91
|
+
metadata: {}
|
92
|
+
post_install_message:
|
84
93
|
rdoc_options: []
|
85
94
|
require_paths:
|
86
95
|
- lib
|
87
96
|
required_ruby_version: !ruby/object:Gem::Requirement
|
88
|
-
none: false
|
89
97
|
requirements:
|
90
|
-
- -
|
98
|
+
- - ">="
|
91
99
|
- !ruby/object:Gem::Version
|
92
100
|
version: '0'
|
93
101
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
94
|
-
none: false
|
95
102
|
requirements:
|
96
|
-
- -
|
103
|
+
- - ">="
|
97
104
|
- !ruby/object:Gem::Version
|
98
105
|
version: '0'
|
99
106
|
requirements: []
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
specification_version: 3
|
107
|
+
rubygems_version: 3.3.3
|
108
|
+
signing_key:
|
109
|
+
specification_version: 4
|
104
110
|
summary: Markdown -> Hiki converter
|
105
|
-
test_files:
|
111
|
+
test_files:
|
112
|
+
- test/hiki_test.rb
|