prolog-services-markdown_to_html 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +9 -0
- data/.travis.yml +4 -0
- data/CODE_OF_CONDUCT.md +49 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +21 -0
- data/README.md +70 -0
- data/Rakefile +48 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/config.reek +8 -0
- data/lib/prolog/services/markdown_to_html.rb +14 -0
- data/lib/prolog/services/markdown_to_html/renderer.rb +25 -0
- data/lib/prolog/services/markdown_to_html/renderer/html_pipeline_converter.rb +67 -0
- data/lib/prolog/services/markdown_to_html/version.rb +9 -0
- data/prolog-services-markdown_to_html.gemspec +56 -0
- metadata +369 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: ab6b648f0763ce89ea6141e28f67bdf9ca59b254
|
4
|
+
data.tar.gz: 03d917926e0042b791097b287355afc2f280a7b5
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: b04e45564744a8633ef1d6dd0e72dc8b98ad6b685fce98fd6e3084282db25c8e795a3179395ac58791d2373c3dfbf334cd40402205b28341fca1e87c1c9e6d06
|
7
|
+
data.tar.gz: 6301ca0dd8b1b7a9b945ad23300716aba912ea2a6bf422316b5fd00fe736d2fb06bf1d9725c838a9fbc3f598fd3952ceec72f0840ff45eec2c9787d81e13ccd6
|
data/.gitignore
ADDED
data/.travis.yml
ADDED
data/CODE_OF_CONDUCT.md
ADDED
@@ -0,0 +1,49 @@
|
|
1
|
+
# Contributor Code of Conduct
|
2
|
+
|
3
|
+
As contributors and maintainers of this project, and in the interest of
|
4
|
+
fostering an open and welcoming community, we pledge to respect all people who
|
5
|
+
contribute through reporting issues, posting feature requests, updating
|
6
|
+
documentation, submitting pull requests or patches, and other activities.
|
7
|
+
|
8
|
+
We are committed to making participation in this project a harassment-free
|
9
|
+
experience for everyone, regardless of level of experience, gender, gender
|
10
|
+
identity and expression, sexual orientation, disability, personal appearance,
|
11
|
+
body size, race, ethnicity, age, religion, or nationality.
|
12
|
+
|
13
|
+
Examples of unacceptable behavior by participants include:
|
14
|
+
|
15
|
+
* The use of sexualized language or imagery
|
16
|
+
* Personal attacks
|
17
|
+
* Trolling or insulting/derogatory comments
|
18
|
+
* Public or private harassment
|
19
|
+
* Publishing other's private information, such as physical or electronic
|
20
|
+
addresses, without explicit permission
|
21
|
+
* Other unethical or unprofessional conduct
|
22
|
+
|
23
|
+
Project maintainers have the right and responsibility to remove, edit, or
|
24
|
+
reject comments, commits, code, wiki edits, issues, and other contributions
|
25
|
+
that are not aligned to this Code of Conduct, or to ban temporarily or
|
26
|
+
permanently any contributor for other behaviors that they deem inappropriate,
|
27
|
+
threatening, offensive, or harmful.
|
28
|
+
|
29
|
+
By adopting this Code of Conduct, project maintainers commit themselves to
|
30
|
+
fairly and consistently applying these principles to every aspect of managing
|
31
|
+
this project. Project maintainers who do not follow or enforce the Code of
|
32
|
+
Conduct may be permanently removed from the project team.
|
33
|
+
|
34
|
+
This code of conduct applies both within project spaces and in public spaces
|
35
|
+
when an individual is representing the project or its community.
|
36
|
+
|
37
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
38
|
+
reported by contacting a project maintainer at jdickey@seven-sigma.com. All
|
39
|
+
complaints will be reviewed and investigated and will result in a response that
|
40
|
+
is deemed necessary and appropriate to the circumstances. Maintainers are
|
41
|
+
obligated to maintain confidentiality with regard to the reporter of an
|
42
|
+
incident.
|
43
|
+
|
44
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
|
45
|
+
version 1.3.0, available at
|
46
|
+
[http://contributor-covenant.org/version/1/3/0/][version]
|
47
|
+
|
48
|
+
[homepage]: http://contributor-covenant.org
|
49
|
+
[version]: http://contributor-covenant.org/version/1/3/0/
|
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2016 Jeff Dickey
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,70 @@
|
|
1
|
+
# Prolog::Services::MarkdownToHtml
|
2
|
+
|
3
|
+
This Gem was extracted from a number of internally-developed applications, which should somewhat explain the namespacing and the initial version number being set to `1.0.0`.
|
4
|
+
|
5
|
+
The Gem provides an (extremely) simple API for converting valid Markdown content, including embedded HTML, to valid HTML that "just happens" to be well-formed XML. This means, *inter alia,* that
|
6
|
+
|
7
|
+
- *supported* [void elements](https://www.w3.org/TR/html-markup/syntax.html#void-element) are guaranteed to be properly closed, where *supported elements* are `<br/>`, `<hr/>`, and `<img …/>`. Each of these supports standard HTML [global attributes](https://www.w3.org/TR/html-markup/global-attributes.html), and the `img` tag supports its defined [permitted attributes](https://www.w3.org/TR/html-markup/img.html#img-attributes);
|
8
|
+
- all non-space whitespace characters are replaced with single space characters; thereby
|
9
|
+
- returning all content as a single "line" of text.
|
10
|
+
|
11
|
+
This is not completely without problems, as careful consideration will reveal. (Code snippets, anyone?)
|
12
|
+
|
13
|
+
## Installation
|
14
|
+
|
15
|
+
Add this line to your application's Gemfile:
|
16
|
+
|
17
|
+
```ruby
|
18
|
+
gem 'prolog-services-markdown_to_html'
|
19
|
+
```
|
20
|
+
|
21
|
+
And then execute:
|
22
|
+
|
23
|
+
```
|
24
|
+
$ bundle
|
25
|
+
```
|
26
|
+
|
27
|
+
Or install it yourself as:
|
28
|
+
|
29
|
+
```
|
30
|
+
$ gem install prolog-services-markdown_to_html
|
31
|
+
```
|
32
|
+
|
33
|
+
## Usage
|
34
|
+
|
35
|
+
The `Prolog::Services::MarkdownToHtml.call` method takes a named `content:` parameter, returning the equivalent HTML.
|
36
|
+
|
37
|
+
```ruby
|
38
|
+
require 'prolog/services/markdown_to_html'
|
39
|
+
|
40
|
+
include Prolog::Services;
|
41
|
+
|
42
|
+
html = MarkdownToHtml.call content: 'This is simple text.'
|
43
|
+
# => "<p>This is simple text.</p>"
|
44
|
+
|
45
|
+
content = "# Hello, World\n\nThis is simple text."
|
46
|
+
html = MarkdownToHtml.call content: content
|
47
|
+
# => "<h1>Hello, World</h1><p>This is simple text.</p>"
|
48
|
+
|
49
|
+
content = "This is some text.\nThis is more text."
|
50
|
+
html = MarkdownToHtml.call content: content
|
51
|
+
"<p>This is some text.<br/>This is more text.</p>"
|
52
|
+
|
53
|
+
content = "Testing.\n\n----\n\nMore testing.\n\n<hr id='hr-01'/>\n\nDone."
|
54
|
+
html = MarkdownToHtml.call content: content
|
55
|
+
# => "<p>Testing.</p><hr/><p>More testing.</p><hr id=\"hr-01\"/><p>Done.</p>"
|
56
|
+
```
|
57
|
+
|
58
|
+
## Development
|
59
|
+
|
60
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
61
|
+
|
62
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
63
|
+
|
64
|
+
## Contributing
|
65
|
+
|
66
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/TheProlog/prolog-services-markdown_to_html. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
67
|
+
|
68
|
+
## License
|
69
|
+
|
70
|
+
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
data/Rakefile
ADDED
@@ -0,0 +1,48 @@
|
|
1
|
+
|
2
|
+
require "bundler/gem_tasks"
|
3
|
+
require "rake/testtask"
|
4
|
+
|
5
|
+
require 'rake/tasklib'
|
6
|
+
require 'flay_task'
|
7
|
+
require 'flog'
|
8
|
+
require 'flog_task'
|
9
|
+
require 'reek/rake/task'
|
10
|
+
require 'rubocop/rake_task'
|
11
|
+
|
12
|
+
Rake::TestTask.new(:test) do |t|
|
13
|
+
t.libs << "test"
|
14
|
+
t.libs << "lib"
|
15
|
+
t.test_files = FileList['test/**/*_test.rb']
|
16
|
+
end
|
17
|
+
|
18
|
+
RuboCop::RakeTask.new(:rubocop) do |task|
|
19
|
+
task.patterns = [
|
20
|
+
'lib/**/*.rb',
|
21
|
+
'test/**/*.rb'
|
22
|
+
]
|
23
|
+
task.formatters = ['simple', 'd']
|
24
|
+
task.fail_on_error = true
|
25
|
+
# task.options << '--rails'
|
26
|
+
task.options << '--display-cop-names'
|
27
|
+
end
|
28
|
+
|
29
|
+
Reek::Rake::Task.new do |t|
|
30
|
+
t.config_file = 'config.reek'
|
31
|
+
t.source_files = '{app,lib,test}/**/*.rb'
|
32
|
+
t.reek_opts = '--sort-by smelliness -s'
|
33
|
+
end
|
34
|
+
|
35
|
+
FlayTask.new do |t|
|
36
|
+
t.verbose = true
|
37
|
+
t.dirs = %w(app lib)
|
38
|
+
end
|
39
|
+
|
40
|
+
FlogTask.new do |t|
|
41
|
+
t.verbose = true
|
42
|
+
t.threshold = 200 # default is 200
|
43
|
+
t.instance_variable_set :@methods_only, true
|
44
|
+
t.dirs = %w(app lib) # Look, Ma; no tests! Run the tool manually every so often for those.
|
45
|
+
end
|
46
|
+
|
47
|
+
task(:default).clear
|
48
|
+
task default: [:test, :rubocop, :flay, :flog, :reek]
|
data/bin/console
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "bundler/setup"
|
4
|
+
require "prolog/services/markdown_to_html"
|
5
|
+
|
6
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
+
# with your gem easier. You can also use a different console, if you like.
|
8
|
+
|
9
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
+
# require "pry"
|
11
|
+
# Pry.start
|
12
|
+
|
13
|
+
require "irb"
|
14
|
+
IRB.start
|
data/bin/setup
ADDED
data/config.reek
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
|
2
|
+
require_relative 'markdown_to_html/version'
|
3
|
+
require_relative 'markdown_to_html/renderer'
|
4
|
+
|
5
|
+
module Prolog
|
6
|
+
module Services
|
7
|
+
# Service to convert Markdown content to equivalent HTML.
|
8
|
+
class MarkdownToHtml
|
9
|
+
def self.call(content:)
|
10
|
+
Renderer.new(content: content).to_s
|
11
|
+
end
|
12
|
+
end # class Prolog::Services::MarkdownToHtml
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
|
2
|
+
require_relative 'renderer/html_pipeline_converter'
|
3
|
+
|
4
|
+
module Prolog
|
5
|
+
module Services
|
6
|
+
# Service to convert Markdown content to equivalent HTML.
|
7
|
+
class MarkdownToHtml
|
8
|
+
# Actually renders Markdown content as (non-compact) HTML.
|
9
|
+
class Renderer
|
10
|
+
private_constant :HtmlPipelineConverter
|
11
|
+
|
12
|
+
def initialize(content:)
|
13
|
+
@rendered = HtmlPipelineConverter.render content
|
14
|
+
self
|
15
|
+
end
|
16
|
+
|
17
|
+
def to_s
|
18
|
+
@rendered
|
19
|
+
end
|
20
|
+
|
21
|
+
alias_method :to_str, :to_s
|
22
|
+
end # class Prolog::Services::MarkdownToHtml::Renderer
|
23
|
+
end # class Prolog::Services::MarkdownToHtml
|
24
|
+
end
|
25
|
+
end
|
@@ -0,0 +1,67 @@
|
|
1
|
+
|
2
|
+
require 'html/pipeline'
|
3
|
+
|
4
|
+
module Prolog
|
5
|
+
module Services
|
6
|
+
# Service to convert Markdown content to equivalent HTML.
|
7
|
+
class MarkdownToHtml
|
8
|
+
# Actually renders Markdown content as (non-compact) HTML.
|
9
|
+
class Renderer
|
10
|
+
# HTML::Pipeline-based code for Markdown parsing.
|
11
|
+
module HtmlPipelineConverter
|
12
|
+
# Support methods, to be hidden from outside view.
|
13
|
+
module Internals
|
14
|
+
def self.cleanup(content)
|
15
|
+
clean_void_elements(strip_lines_in(content).join)
|
16
|
+
end
|
17
|
+
|
18
|
+
# Void elements supported:
|
19
|
+
# %w(br hr img)
|
20
|
+
# Unsupported void elements:
|
21
|
+
# %w(area base col command embed input keygen link meta param
|
22
|
+
# source track wbr)
|
23
|
+
# As per https://www.w3.org/TR/html-markup/syntax.html#void-element
|
24
|
+
def self.clean_void_elements(markup)
|
25
|
+
markup.gsub(/<br(.*?)>/, '<br\1/>')
|
26
|
+
.gsub(/<hr(.*?)>/, '<hr\1/>')
|
27
|
+
.gsub(/<img(.*?)>/, '<img\1/>')
|
28
|
+
end
|
29
|
+
|
30
|
+
def self.strip_lines_in(content)
|
31
|
+
content.lines.map(&:rstrip)
|
32
|
+
end
|
33
|
+
|
34
|
+
def self.context
|
35
|
+
{
|
36
|
+
gfm: true,
|
37
|
+
asset_root: '/images', # for emoji
|
38
|
+
base_url: 'https://github.com/' # for @mentions
|
39
|
+
}
|
40
|
+
end
|
41
|
+
|
42
|
+
def self.filters
|
43
|
+
[
|
44
|
+
HTML::Pipeline::MarkdownFilter,
|
45
|
+
HTML::Pipeline::ImageMaxWidthFilter,
|
46
|
+
HTML::Pipeline::MentionFilter,
|
47
|
+
HTML::Pipeline::EmojiFilter,
|
48
|
+
# HTML::Pipeline::SyntaxHighlightFilter,
|
49
|
+
HTML::Pipeline::AutolinkFilter
|
50
|
+
]
|
51
|
+
end
|
52
|
+
|
53
|
+
def self.pipeline
|
54
|
+
HTML::Pipeline.new filters, context
|
55
|
+
end
|
56
|
+
end # module ...::Renderer::HtmlPipelineConverter::Internals
|
57
|
+
private_constant :Internals
|
58
|
+
|
59
|
+
def self.render(fragment)
|
60
|
+
result = Internals.pipeline.call fragment
|
61
|
+
Internals.cleanup result[:output]
|
62
|
+
end
|
63
|
+
end # module ...::MarkdownToHtml::Renderer::HtmlPipelineConverter
|
64
|
+
end # class Prolog::Services::MarkdownToHtml::Renderer
|
65
|
+
end # class Prolog::Services::MarkdownToHtml
|
66
|
+
end
|
67
|
+
end
|
@@ -0,0 +1,56 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'prolog/services/markdown_to_html/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "prolog-services-markdown_to_html"
|
8
|
+
spec.version = Prolog::Services::MarkdownToHtml::VERSION
|
9
|
+
spec.authors = ["Jeff Dickey"]
|
10
|
+
spec.email = ["jdickey@seven-sigma.com"]
|
11
|
+
|
12
|
+
spec.summary = %q{Converts Markdown content to HTML with minimal whitespace.}
|
13
|
+
spec.description = %q{The Prolog::Services::MarkdownToHtml class converts valid
|
14
|
+
Markdown to valid HTML (as well-formed XML; i.e., void element
|
15
|
+
tags such as <br/> are always properly closed). The resulting
|
16
|
+
HTML is rendered as a single line of text with all unnecessary
|
17
|
+
whitespace removed.}
|
18
|
+
spec.homepage = "https://github.com/theprolog/prolog-services-markdown_to_html"
|
19
|
+
spec.license = "MIT"
|
20
|
+
|
21
|
+
# Prevent pushing this gem to RubyGems.org by setting 'allowed_push_host', or
|
22
|
+
# delete this section to allow pushing this gem to any host.
|
23
|
+
# if spec.respond_to?(:metadata)
|
24
|
+
# spec.metadata['allowed_push_host'] = "TODO: Set to 'http://mygemserver.com'"
|
25
|
+
# else
|
26
|
+
# raise "RubyGems 2.0 or newer is required to protect against public gem pushes."
|
27
|
+
# end
|
28
|
+
|
29
|
+
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
30
|
+
spec.bindir = "exe"
|
31
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
32
|
+
spec.require_paths = ["lib"]
|
33
|
+
|
34
|
+
spec.add_dependency "ox", "~> 2.3"
|
35
|
+
spec.add_dependency "html-pipeline", "~> 2.3"
|
36
|
+
spec.add_dependency "gemoji", "~> 2.1"
|
37
|
+
spec.add_dependency "github-markdown", "0.6.9"
|
38
|
+
spec.add_dependency "rinku", "~> 1.7", ">= 1.7.3"
|
39
|
+
|
40
|
+
spec.add_development_dependency "bundler", "~> 1.11"
|
41
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
42
|
+
spec.add_development_dependency "minitest", "~> 5.0"
|
43
|
+
|
44
|
+
spec.add_development_dependency "minitest-matchers", "~> 1.4"
|
45
|
+
spec.add_development_dependency "minitest-reporters", "~> 1.0"
|
46
|
+
spec.add_development_dependency "minitest-tagz", "~> 1.2"
|
47
|
+
spec.add_development_dependency "flay", "~> 2.6"
|
48
|
+
spec.add_development_dependency "flog", "~> 4.3", ">= 4.3.2"
|
49
|
+
spec.add_development_dependency "reek", "~> 3.7"
|
50
|
+
spec.add_development_dependency "rubocop", "0.35.1" # FIXME: newer introduces odd config problems
|
51
|
+
spec.add_development_dependency "simplecov", "~> 0.10"
|
52
|
+
spec.add_development_dependency "pry-byebug", "~> 3.2"
|
53
|
+
spec.add_development_dependency "pry-doc", "~> 0.8"
|
54
|
+
spec.add_development_dependency "colorize", "~> 0.7", ">= 0.7.7"
|
55
|
+
spec.add_development_dependency "awesome_print", "~> 1.6", ">= 1.6.1"
|
56
|
+
end
|
metadata
ADDED
@@ -0,0 +1,369 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: prolog-services-markdown_to_html
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Jeff Dickey
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2016-03-16 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: ox
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '2.3'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '2.3'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: html-pipeline
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '2.3'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '2.3'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: gemoji
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '2.1'
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '2.1'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: github-markdown
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - '='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: 0.6.9
|
62
|
+
type: :runtime
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - '='
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: 0.6.9
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: rinku
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '1.7'
|
76
|
+
- - ">="
|
77
|
+
- !ruby/object:Gem::Version
|
78
|
+
version: 1.7.3
|
79
|
+
type: :runtime
|
80
|
+
prerelease: false
|
81
|
+
version_requirements: !ruby/object:Gem::Requirement
|
82
|
+
requirements:
|
83
|
+
- - "~>"
|
84
|
+
- !ruby/object:Gem::Version
|
85
|
+
version: '1.7'
|
86
|
+
- - ">="
|
87
|
+
- !ruby/object:Gem::Version
|
88
|
+
version: 1.7.3
|
89
|
+
- !ruby/object:Gem::Dependency
|
90
|
+
name: bundler
|
91
|
+
requirement: !ruby/object:Gem::Requirement
|
92
|
+
requirements:
|
93
|
+
- - "~>"
|
94
|
+
- !ruby/object:Gem::Version
|
95
|
+
version: '1.11'
|
96
|
+
type: :development
|
97
|
+
prerelease: false
|
98
|
+
version_requirements: !ruby/object:Gem::Requirement
|
99
|
+
requirements:
|
100
|
+
- - "~>"
|
101
|
+
- !ruby/object:Gem::Version
|
102
|
+
version: '1.11'
|
103
|
+
- !ruby/object:Gem::Dependency
|
104
|
+
name: rake
|
105
|
+
requirement: !ruby/object:Gem::Requirement
|
106
|
+
requirements:
|
107
|
+
- - "~>"
|
108
|
+
- !ruby/object:Gem::Version
|
109
|
+
version: '10.0'
|
110
|
+
type: :development
|
111
|
+
prerelease: false
|
112
|
+
version_requirements: !ruby/object:Gem::Requirement
|
113
|
+
requirements:
|
114
|
+
- - "~>"
|
115
|
+
- !ruby/object:Gem::Version
|
116
|
+
version: '10.0'
|
117
|
+
- !ruby/object:Gem::Dependency
|
118
|
+
name: minitest
|
119
|
+
requirement: !ruby/object:Gem::Requirement
|
120
|
+
requirements:
|
121
|
+
- - "~>"
|
122
|
+
- !ruby/object:Gem::Version
|
123
|
+
version: '5.0'
|
124
|
+
type: :development
|
125
|
+
prerelease: false
|
126
|
+
version_requirements: !ruby/object:Gem::Requirement
|
127
|
+
requirements:
|
128
|
+
- - "~>"
|
129
|
+
- !ruby/object:Gem::Version
|
130
|
+
version: '5.0'
|
131
|
+
- !ruby/object:Gem::Dependency
|
132
|
+
name: minitest-matchers
|
133
|
+
requirement: !ruby/object:Gem::Requirement
|
134
|
+
requirements:
|
135
|
+
- - "~>"
|
136
|
+
- !ruby/object:Gem::Version
|
137
|
+
version: '1.4'
|
138
|
+
type: :development
|
139
|
+
prerelease: false
|
140
|
+
version_requirements: !ruby/object:Gem::Requirement
|
141
|
+
requirements:
|
142
|
+
- - "~>"
|
143
|
+
- !ruby/object:Gem::Version
|
144
|
+
version: '1.4'
|
145
|
+
- !ruby/object:Gem::Dependency
|
146
|
+
name: minitest-reporters
|
147
|
+
requirement: !ruby/object:Gem::Requirement
|
148
|
+
requirements:
|
149
|
+
- - "~>"
|
150
|
+
- !ruby/object:Gem::Version
|
151
|
+
version: '1.0'
|
152
|
+
type: :development
|
153
|
+
prerelease: false
|
154
|
+
version_requirements: !ruby/object:Gem::Requirement
|
155
|
+
requirements:
|
156
|
+
- - "~>"
|
157
|
+
- !ruby/object:Gem::Version
|
158
|
+
version: '1.0'
|
159
|
+
- !ruby/object:Gem::Dependency
|
160
|
+
name: minitest-tagz
|
161
|
+
requirement: !ruby/object:Gem::Requirement
|
162
|
+
requirements:
|
163
|
+
- - "~>"
|
164
|
+
- !ruby/object:Gem::Version
|
165
|
+
version: '1.2'
|
166
|
+
type: :development
|
167
|
+
prerelease: false
|
168
|
+
version_requirements: !ruby/object:Gem::Requirement
|
169
|
+
requirements:
|
170
|
+
- - "~>"
|
171
|
+
- !ruby/object:Gem::Version
|
172
|
+
version: '1.2'
|
173
|
+
- !ruby/object:Gem::Dependency
|
174
|
+
name: flay
|
175
|
+
requirement: !ruby/object:Gem::Requirement
|
176
|
+
requirements:
|
177
|
+
- - "~>"
|
178
|
+
- !ruby/object:Gem::Version
|
179
|
+
version: '2.6'
|
180
|
+
type: :development
|
181
|
+
prerelease: false
|
182
|
+
version_requirements: !ruby/object:Gem::Requirement
|
183
|
+
requirements:
|
184
|
+
- - "~>"
|
185
|
+
- !ruby/object:Gem::Version
|
186
|
+
version: '2.6'
|
187
|
+
- !ruby/object:Gem::Dependency
|
188
|
+
name: flog
|
189
|
+
requirement: !ruby/object:Gem::Requirement
|
190
|
+
requirements:
|
191
|
+
- - "~>"
|
192
|
+
- !ruby/object:Gem::Version
|
193
|
+
version: '4.3'
|
194
|
+
- - ">="
|
195
|
+
- !ruby/object:Gem::Version
|
196
|
+
version: 4.3.2
|
197
|
+
type: :development
|
198
|
+
prerelease: false
|
199
|
+
version_requirements: !ruby/object:Gem::Requirement
|
200
|
+
requirements:
|
201
|
+
- - "~>"
|
202
|
+
- !ruby/object:Gem::Version
|
203
|
+
version: '4.3'
|
204
|
+
- - ">="
|
205
|
+
- !ruby/object:Gem::Version
|
206
|
+
version: 4.3.2
|
207
|
+
- !ruby/object:Gem::Dependency
|
208
|
+
name: reek
|
209
|
+
requirement: !ruby/object:Gem::Requirement
|
210
|
+
requirements:
|
211
|
+
- - "~>"
|
212
|
+
- !ruby/object:Gem::Version
|
213
|
+
version: '3.7'
|
214
|
+
type: :development
|
215
|
+
prerelease: false
|
216
|
+
version_requirements: !ruby/object:Gem::Requirement
|
217
|
+
requirements:
|
218
|
+
- - "~>"
|
219
|
+
- !ruby/object:Gem::Version
|
220
|
+
version: '3.7'
|
221
|
+
- !ruby/object:Gem::Dependency
|
222
|
+
name: rubocop
|
223
|
+
requirement: !ruby/object:Gem::Requirement
|
224
|
+
requirements:
|
225
|
+
- - '='
|
226
|
+
- !ruby/object:Gem::Version
|
227
|
+
version: 0.35.1
|
228
|
+
type: :development
|
229
|
+
prerelease: false
|
230
|
+
version_requirements: !ruby/object:Gem::Requirement
|
231
|
+
requirements:
|
232
|
+
- - '='
|
233
|
+
- !ruby/object:Gem::Version
|
234
|
+
version: 0.35.1
|
235
|
+
- !ruby/object:Gem::Dependency
|
236
|
+
name: simplecov
|
237
|
+
requirement: !ruby/object:Gem::Requirement
|
238
|
+
requirements:
|
239
|
+
- - "~>"
|
240
|
+
- !ruby/object:Gem::Version
|
241
|
+
version: '0.10'
|
242
|
+
type: :development
|
243
|
+
prerelease: false
|
244
|
+
version_requirements: !ruby/object:Gem::Requirement
|
245
|
+
requirements:
|
246
|
+
- - "~>"
|
247
|
+
- !ruby/object:Gem::Version
|
248
|
+
version: '0.10'
|
249
|
+
- !ruby/object:Gem::Dependency
|
250
|
+
name: pry-byebug
|
251
|
+
requirement: !ruby/object:Gem::Requirement
|
252
|
+
requirements:
|
253
|
+
- - "~>"
|
254
|
+
- !ruby/object:Gem::Version
|
255
|
+
version: '3.2'
|
256
|
+
type: :development
|
257
|
+
prerelease: false
|
258
|
+
version_requirements: !ruby/object:Gem::Requirement
|
259
|
+
requirements:
|
260
|
+
- - "~>"
|
261
|
+
- !ruby/object:Gem::Version
|
262
|
+
version: '3.2'
|
263
|
+
- !ruby/object:Gem::Dependency
|
264
|
+
name: pry-doc
|
265
|
+
requirement: !ruby/object:Gem::Requirement
|
266
|
+
requirements:
|
267
|
+
- - "~>"
|
268
|
+
- !ruby/object:Gem::Version
|
269
|
+
version: '0.8'
|
270
|
+
type: :development
|
271
|
+
prerelease: false
|
272
|
+
version_requirements: !ruby/object:Gem::Requirement
|
273
|
+
requirements:
|
274
|
+
- - "~>"
|
275
|
+
- !ruby/object:Gem::Version
|
276
|
+
version: '0.8'
|
277
|
+
- !ruby/object:Gem::Dependency
|
278
|
+
name: colorize
|
279
|
+
requirement: !ruby/object:Gem::Requirement
|
280
|
+
requirements:
|
281
|
+
- - "~>"
|
282
|
+
- !ruby/object:Gem::Version
|
283
|
+
version: '0.7'
|
284
|
+
- - ">="
|
285
|
+
- !ruby/object:Gem::Version
|
286
|
+
version: 0.7.7
|
287
|
+
type: :development
|
288
|
+
prerelease: false
|
289
|
+
version_requirements: !ruby/object:Gem::Requirement
|
290
|
+
requirements:
|
291
|
+
- - "~>"
|
292
|
+
- !ruby/object:Gem::Version
|
293
|
+
version: '0.7'
|
294
|
+
- - ">="
|
295
|
+
- !ruby/object:Gem::Version
|
296
|
+
version: 0.7.7
|
297
|
+
- !ruby/object:Gem::Dependency
|
298
|
+
name: awesome_print
|
299
|
+
requirement: !ruby/object:Gem::Requirement
|
300
|
+
requirements:
|
301
|
+
- - "~>"
|
302
|
+
- !ruby/object:Gem::Version
|
303
|
+
version: '1.6'
|
304
|
+
- - ">="
|
305
|
+
- !ruby/object:Gem::Version
|
306
|
+
version: 1.6.1
|
307
|
+
type: :development
|
308
|
+
prerelease: false
|
309
|
+
version_requirements: !ruby/object:Gem::Requirement
|
310
|
+
requirements:
|
311
|
+
- - "~>"
|
312
|
+
- !ruby/object:Gem::Version
|
313
|
+
version: '1.6'
|
314
|
+
- - ">="
|
315
|
+
- !ruby/object:Gem::Version
|
316
|
+
version: 1.6.1
|
317
|
+
description: |-
|
318
|
+
The Prolog::Services::MarkdownToHtml class converts valid
|
319
|
+
Markdown to valid HTML (as well-formed XML; i.e., void element
|
320
|
+
tags such as <br/> are always properly closed). The resulting
|
321
|
+
HTML is rendered as a single line of text with all unnecessary
|
322
|
+
whitespace removed.
|
323
|
+
email:
|
324
|
+
- jdickey@seven-sigma.com
|
325
|
+
executables: []
|
326
|
+
extensions: []
|
327
|
+
extra_rdoc_files: []
|
328
|
+
files:
|
329
|
+
- ".gitignore"
|
330
|
+
- ".travis.yml"
|
331
|
+
- CODE_OF_CONDUCT.md
|
332
|
+
- Gemfile
|
333
|
+
- LICENSE.txt
|
334
|
+
- README.md
|
335
|
+
- Rakefile
|
336
|
+
- bin/console
|
337
|
+
- bin/setup
|
338
|
+
- config.reek
|
339
|
+
- lib/prolog/services/markdown_to_html.rb
|
340
|
+
- lib/prolog/services/markdown_to_html/renderer.rb
|
341
|
+
- lib/prolog/services/markdown_to_html/renderer/html_pipeline_converter.rb
|
342
|
+
- lib/prolog/services/markdown_to_html/version.rb
|
343
|
+
- prolog-services-markdown_to_html.gemspec
|
344
|
+
homepage: https://github.com/theprolog/prolog-services-markdown_to_html
|
345
|
+
licenses:
|
346
|
+
- MIT
|
347
|
+
metadata: {}
|
348
|
+
post_install_message:
|
349
|
+
rdoc_options: []
|
350
|
+
require_paths:
|
351
|
+
- lib
|
352
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
353
|
+
requirements:
|
354
|
+
- - ">="
|
355
|
+
- !ruby/object:Gem::Version
|
356
|
+
version: '0'
|
357
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
358
|
+
requirements:
|
359
|
+
- - ">="
|
360
|
+
- !ruby/object:Gem::Version
|
361
|
+
version: '0'
|
362
|
+
requirements: []
|
363
|
+
rubyforge_project:
|
364
|
+
rubygems_version: 2.6.1
|
365
|
+
signing_key:
|
366
|
+
specification_version: 4
|
367
|
+
summary: Converts Markdown content to HTML with minimal whitespace.
|
368
|
+
test_files: []
|
369
|
+
has_rdoc:
|