multimarkdown 4.5.0.r1
Sign up to get free protection for your applications and to get access to all the features.
- data/LICENSE +75 -0
- data/MultiMarkdown-4/GLibFacade.c +294 -0
- data/MultiMarkdown-4/GLibFacade.h +95 -0
- data/MultiMarkdown-4/beamer.c +179 -0
- data/MultiMarkdown-4/beamer.h +11 -0
- data/MultiMarkdown-4/critic.c +111 -0
- data/MultiMarkdown-4/critic.h +15 -0
- data/MultiMarkdown-4/glib.h +11 -0
- data/MultiMarkdown-4/html.c +1060 -0
- data/MultiMarkdown-4/html.h +14 -0
- data/MultiMarkdown-4/latex.c +1137 -0
- data/MultiMarkdown-4/latex.h +16 -0
- data/MultiMarkdown-4/libMultiMarkdown.h +156 -0
- data/MultiMarkdown-4/lyx.c +2163 -0
- data/MultiMarkdown-4/lyx.h +36 -0
- data/MultiMarkdown-4/lyxbeamer.c +267 -0
- data/MultiMarkdown-4/lyxbeamer.h +11 -0
- data/MultiMarkdown-4/memoir.c +79 -0
- data/MultiMarkdown-4/memoir.h +10 -0
- data/MultiMarkdown-4/multimarkdown.c +483 -0
- data/MultiMarkdown-4/odf.c +1201 -0
- data/MultiMarkdown-4/odf.h +18 -0
- data/MultiMarkdown-4/opml.c +188 -0
- data/MultiMarkdown-4/opml.h +15 -0
- data/MultiMarkdown-4/parse_utilities.c +752 -0
- data/MultiMarkdown-4/parser.c +15582 -0
- data/MultiMarkdown-4/parser.h +186 -0
- data/MultiMarkdown-4/rng.c +117 -0
- data/MultiMarkdown-4/rtf.c +648 -0
- data/MultiMarkdown-4/rtf.h +17 -0
- data/MultiMarkdown-4/strtok.c +56 -0
- data/MultiMarkdown-4/strtok.h +9 -0
- data/MultiMarkdown-4/text.c +53 -0
- data/MultiMarkdown-4/text.h +11 -0
- data/MultiMarkdown-4/transclude.c +213 -0
- data/MultiMarkdown-4/transclude.h +26 -0
- data/MultiMarkdown-4/writer.c +576 -0
- data/MultiMarkdown-4/writer.h +34 -0
- data/README.md +70 -0
- data/Rakefile +85 -0
- data/bin/ruby_multi_markdown +128 -0
- data/ext/extconf.h +3 -0
- data/ext/extconf.rb +17 -0
- data/ext/multi_markdown.c +100 -0
- data/lib/multi_markdown.bundle +0 -0
- data/lib/multi_markdown.rb +88 -0
- data/lib/multi_markdown/version.rb +6 -0
- data/lib/multimarkdown.rb +1 -0
- data/multi_markdown.gemspec +37 -0
- data/test/multi_markdown_test.rb +64 -0
- metadata +119 -0
@@ -0,0 +1 @@
|
|
1
|
+
require 'multi_markdown'
|
@@ -0,0 +1,37 @@
|
|
1
|
+
# Copyright 2014 Till Schulte-Coerne
|
2
|
+
#
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at
|
6
|
+
#
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
# See the License for the specific language governing permissions and
|
13
|
+
# limitations under the License.
|
14
|
+
|
15
|
+
# -*- encoding: utf-8 -*-
|
16
|
+
$:.push File.expand_path("../lib", __FILE__)
|
17
|
+
require "multi_markdown/version"
|
18
|
+
|
19
|
+
Gem::Specification.new do |s|
|
20
|
+
s.name = "multimarkdown"
|
21
|
+
s.version = MultiMarkdown::VERSION
|
22
|
+
s.platform = Gem::Platform::RUBY
|
23
|
+
s.authors = ["Till Schulte-Coerne"]
|
24
|
+
s.email = ["till.schulte-coerne@innoq.com"]
|
25
|
+
s.homepage = "http://github.com/tillsc/multi_markdown"
|
26
|
+
s.summary = "A MultiMarkdown 4 binding for Ruby"
|
27
|
+
s.description = s.summary
|
28
|
+
s.extra_rdoc_files = ['README.md', 'LICENSE']
|
29
|
+
|
30
|
+
s.add_dependency "bundler"
|
31
|
+
|
32
|
+
s.files = %w(LICENSE README.md Rakefile multi_markdown.gemspec) + Dir.glob("{bin,lib,test}/**/*") + Dir.glob("{ext,MultiMarkdown-4}/*.{c,h,rb}")
|
33
|
+
s.test_files = Dir.glob("{test}/**/*")
|
34
|
+
s.executables = "ruby_multi_markdown"
|
35
|
+
s.extensions = ['ext/extconf.rb']
|
36
|
+
s.require_paths = ["lib"]
|
37
|
+
end
|
@@ -0,0 +1,64 @@
|
|
1
|
+
$: << File.join(File.dirname(__FILE__), "../lib")
|
2
|
+
|
3
|
+
require 'test/unit'
|
4
|
+
require 'multi_markdown'
|
5
|
+
|
6
|
+
class MultiMarkdownTest < Test::Unit::TestCase
|
7
|
+
|
8
|
+
def test_extension_methods_present_on_multimarkdown_class
|
9
|
+
assert MultiMarkdown.instance_methods.include?(:to_html),
|
10
|
+
"MultiMarkdown class should respond to #to_html"
|
11
|
+
end
|
12
|
+
|
13
|
+
def test_simple_one_liner_to_html
|
14
|
+
multimarkdown = MultiMarkdown.new('Hello World.')
|
15
|
+
assert_respond_to multimarkdown, :to_html
|
16
|
+
assert_equal "<p>Hello World.</p>", multimarkdown.to_html.strip
|
17
|
+
end
|
18
|
+
|
19
|
+
def test_inline_multimarkdown_to_html
|
20
|
+
multimarkdown = MultiMarkdown.new('_Hello World_!')
|
21
|
+
assert_respond_to multimarkdown, :to_html
|
22
|
+
assert_equal "<p><em>Hello World</em>!</p>", multimarkdown.to_html.strip
|
23
|
+
end
|
24
|
+
|
25
|
+
def test_multimarkdown_in_html_to_html
|
26
|
+
multimarkdown = MultiMarkdown.new('Hello <span>_World_</span>!',:process_html)
|
27
|
+
assert_respond_to multimarkdown, :to_html
|
28
|
+
assert_equal "<p>Hello <span><em>World</em></span>!</p>", multimarkdown.to_html.strip
|
29
|
+
end
|
30
|
+
|
31
|
+
def test_version_fits
|
32
|
+
assert MultiMarkdown::VERSION =~ /^#{MultiMarkdown::MMD_VERSION}/,
|
33
|
+
"Expected MultiMarkdown's version (#{MultiMarkdown::VERSION}) to start with the C library's version (#{MultiMarkdown::MMD_VERSION})"
|
34
|
+
end
|
35
|
+
|
36
|
+
def test_meta_attributes
|
37
|
+
multimarkdown = MultiMarkdown.new(<<-eof)
|
38
|
+
meta1: Foo
|
39
|
+
meta2: Bar
|
40
|
+
|
41
|
+
Lorem Ipsum
|
42
|
+
eof
|
43
|
+
assert_equal ["meta1", "meta2"], multimarkdown.extract_metadata_keys()
|
44
|
+
|
45
|
+
assert_equal "Foo", multimarkdown.extract_metadata_value("Meta1")
|
46
|
+
assert_equal "Bar", multimarkdown.extract_metadata_value("Meta2")
|
47
|
+
end
|
48
|
+
|
49
|
+
def test_cached_metadata
|
50
|
+
multimarkdown = MultiMarkdown.new(<<-eof)
|
51
|
+
MetaTheMeta1: Foo
|
52
|
+
MetaTheMeta2: Bar
|
53
|
+
|
54
|
+
Lorem Ipsum
|
55
|
+
eof
|
56
|
+
|
57
|
+
assert_equal({"metathemeta1" => "Foo", "metathemeta2" => "Bar"}, multimarkdown.metadata)
|
58
|
+
|
59
|
+
assert_equal("Foo", multimarkdown.metadata("MetaTheMeta1"))
|
60
|
+
assert_equal(nil, multimarkdown.metadata["MetaTheMeta1"])
|
61
|
+
end
|
62
|
+
|
63
|
+
|
64
|
+
end
|
metadata
ADDED
@@ -0,0 +1,119 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: multimarkdown
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 4.5.0.r1
|
5
|
+
prerelease: 6
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Till Schulte-Coerne
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2014-01-13 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: bundler
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
18
|
+
requirements:
|
19
|
+
- - ! '>='
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '0'
|
22
|
+
type: :runtime
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ! '>='
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '0'
|
30
|
+
description: A MultiMarkdown 4 binding for Ruby
|
31
|
+
email:
|
32
|
+
- till.schulte-coerne@innoq.com
|
33
|
+
executables:
|
34
|
+
- ruby_multi_markdown
|
35
|
+
extensions:
|
36
|
+
- ext/extconf.rb
|
37
|
+
extra_rdoc_files:
|
38
|
+
- README.md
|
39
|
+
- LICENSE
|
40
|
+
files:
|
41
|
+
- LICENSE
|
42
|
+
- README.md
|
43
|
+
- Rakefile
|
44
|
+
- multi_markdown.gemspec
|
45
|
+
- bin/ruby_multi_markdown
|
46
|
+
- lib/multi_markdown/version.rb
|
47
|
+
- lib/multi_markdown.bundle
|
48
|
+
- lib/multi_markdown.rb
|
49
|
+
- lib/multimarkdown.rb
|
50
|
+
- test/multi_markdown_test.rb
|
51
|
+
- ext/multi_markdown.c
|
52
|
+
- ext/extconf.h
|
53
|
+
- ext/extconf.rb
|
54
|
+
- MultiMarkdown-4/beamer.c
|
55
|
+
- MultiMarkdown-4/critic.c
|
56
|
+
- MultiMarkdown-4/GLibFacade.c
|
57
|
+
- MultiMarkdown-4/html.c
|
58
|
+
- MultiMarkdown-4/latex.c
|
59
|
+
- MultiMarkdown-4/lyx.c
|
60
|
+
- MultiMarkdown-4/lyxbeamer.c
|
61
|
+
- MultiMarkdown-4/memoir.c
|
62
|
+
- MultiMarkdown-4/multimarkdown.c
|
63
|
+
- MultiMarkdown-4/odf.c
|
64
|
+
- MultiMarkdown-4/opml.c
|
65
|
+
- MultiMarkdown-4/parse_utilities.c
|
66
|
+
- MultiMarkdown-4/parser.c
|
67
|
+
- MultiMarkdown-4/rng.c
|
68
|
+
- MultiMarkdown-4/rtf.c
|
69
|
+
- MultiMarkdown-4/strtok.c
|
70
|
+
- MultiMarkdown-4/text.c
|
71
|
+
- MultiMarkdown-4/transclude.c
|
72
|
+
- MultiMarkdown-4/writer.c
|
73
|
+
- MultiMarkdown-4/beamer.h
|
74
|
+
- MultiMarkdown-4/critic.h
|
75
|
+
- MultiMarkdown-4/glib.h
|
76
|
+
- MultiMarkdown-4/GLibFacade.h
|
77
|
+
- MultiMarkdown-4/html.h
|
78
|
+
- MultiMarkdown-4/latex.h
|
79
|
+
- MultiMarkdown-4/libMultiMarkdown.h
|
80
|
+
- MultiMarkdown-4/lyx.h
|
81
|
+
- MultiMarkdown-4/lyxbeamer.h
|
82
|
+
- MultiMarkdown-4/memoir.h
|
83
|
+
- MultiMarkdown-4/odf.h
|
84
|
+
- MultiMarkdown-4/opml.h
|
85
|
+
- MultiMarkdown-4/parser.h
|
86
|
+
- MultiMarkdown-4/rtf.h
|
87
|
+
- MultiMarkdown-4/strtok.h
|
88
|
+
- MultiMarkdown-4/text.h
|
89
|
+
- MultiMarkdown-4/transclude.h
|
90
|
+
- MultiMarkdown-4/writer.h
|
91
|
+
homepage: http://github.com/tillsc/multi_markdown
|
92
|
+
licenses: []
|
93
|
+
post_install_message:
|
94
|
+
rdoc_options: []
|
95
|
+
require_paths:
|
96
|
+
- lib
|
97
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
98
|
+
none: false
|
99
|
+
requirements:
|
100
|
+
- - ! '>='
|
101
|
+
- !ruby/object:Gem::Version
|
102
|
+
version: '0'
|
103
|
+
segments:
|
104
|
+
- 0
|
105
|
+
hash: -3256103490403231810
|
106
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
107
|
+
none: false
|
108
|
+
requirements:
|
109
|
+
- - ! '>'
|
110
|
+
- !ruby/object:Gem::Version
|
111
|
+
version: 1.3.1
|
112
|
+
requirements: []
|
113
|
+
rubyforge_project:
|
114
|
+
rubygems_version: 1.8.23
|
115
|
+
signing_key:
|
116
|
+
specification_version: 3
|
117
|
+
summary: A MultiMarkdown 4 binding for Ruby
|
118
|
+
test_files:
|
119
|
+
- test/multi_markdown_test.rb
|