html-pipeline 2.5.0 → 2.6.0
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/.travis.yml +3 -0
- data/Gemfile +1 -1
- data/README.md +2 -1
- data/lib/html/pipeline.rb +2 -1
- data/lib/html/pipeline/markdown_filter.rb +5 -4
- data/lib/html/pipeline/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4331ea961008327c8a6a060c0c3c44ce412e7435
|
4
|
+
data.tar.gz: 7a4579b7a5b1f9e838b8db0527658528eaeb1527
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ba87020a503a6f84766b0df1d23522064bcd2a7ba63bdf79151dc8c93807302d3d03fcfda9f13365fe660025f7961b5a1a7a45b326a58b56667a6d7d841d809b
|
7
|
+
data.tar.gz: fd4d5ef1ef9aee02c595dca5e4ea28e1470a2b38cf8c7994dcc5e7789c0a71eacd45bb9eec4dd65c1bd9817936db603786699cc9967d501c364bd58818fb15c9
|
data/.travis.yml
CHANGED
data/Gemfile
CHANGED
@@ -14,7 +14,7 @@ group :test do
|
|
14
14
|
gem "rinku", "~> 1.7", :require => false
|
15
15
|
gem "gemoji", "~> 2.0", :require => false
|
16
16
|
gem "RedCloth", "~> 4.2.9", :require => false
|
17
|
-
gem "
|
17
|
+
gem "commonmarker", "~> 0.14", :require => false
|
18
18
|
gem "email_reply_parser", "~> 0.5", :require => false
|
19
19
|
gem "sanitize", "~> 2.0", :require => false
|
20
20
|
|
data/README.md
CHANGED
@@ -182,7 +182,7 @@ gem 'github-linguist'
|
|
182
182
|
* `AutolinkFilter` - `rinku`
|
183
183
|
* `EmailReplyFilter` - `escape_utils`, `email_reply_parser`
|
184
184
|
* `EmojiFilter` - `gemoji`
|
185
|
-
* `MarkdownFilter` - `
|
185
|
+
* `MarkdownFilter` - `commonmarker`
|
186
186
|
* `PlainTextInputFilter` - `escape_utils`
|
187
187
|
* `SanitizationFilter` - `sanitize`
|
188
188
|
* `SyntaxHighlightFilter` - `github-linguist`
|
@@ -252,6 +252,7 @@ Here are some extensions people have built:
|
|
252
252
|
* [html-pipeline-linkify_github](https://github.com/jollygoodcode/html-pipeline-linkify_github) - An HTML::Pipeline filter to autolink GitHub urls
|
253
253
|
* [html-pipeline-redcarpet_filter](https://github.com/bmikol/html-pipeline-redcarpet_filter) - Render Markdown source text into Markdown HTML using Redcarpet
|
254
254
|
* [html-pipeline-typogruby_filter](https://github.com/bmikol/html-pipeline-typogruby_filter) - Add Typogruby text filters to your HTML::Pipeline
|
255
|
+
* [korgi](https://github.com/jodeci/korgi) - HTML::Pipeline filters for links to Rails resources
|
255
256
|
|
256
257
|
|
257
258
|
## Instrumenting
|
data/lib/html/pipeline.rb
CHANGED
@@ -69,7 +69,8 @@ module HTML
|
|
69
69
|
# Public: String name for this Pipeline. Defaults to Class name.
|
70
70
|
attr_writer :instrumentation_name
|
71
71
|
def instrumentation_name
|
72
|
-
@instrumentation_name
|
72
|
+
return @instrumentation_name if defined?(@instrumentation_name)
|
73
|
+
@instrumentation_name = self.class.name
|
73
74
|
end
|
74
75
|
|
75
76
|
class << self
|
@@ -1,7 +1,7 @@
|
|
1
1
|
begin
|
2
|
-
require "
|
2
|
+
require "commonmarker"
|
3
3
|
rescue LoadError => _
|
4
|
-
raise HTML::Pipeline::MissingDependencyError, "Missing dependency '
|
4
|
+
raise HTML::Pipeline::MissingDependencyError, "Missing dependency 'commonmarker' for MarkdownFilter. See README.md for details."
|
5
5
|
end
|
6
6
|
|
7
7
|
module HTML
|
@@ -23,8 +23,9 @@ module HTML
|
|
23
23
|
# Convert Markdown to HTML using the best available implementation
|
24
24
|
# and convert into a DocumentFragment.
|
25
25
|
def call
|
26
|
-
|
27
|
-
|
26
|
+
options = [:GITHUB_PRE_LANG]
|
27
|
+
options << :HARDBREAKS if context[:gfm] != false
|
28
|
+
html = CommonMarker.render_html(@text, options, [:table, :strikethrough, :tagfilter, :autolink])
|
28
29
|
html.rstrip!
|
29
30
|
html
|
30
31
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: html-pipeline
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryan Tomayko
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2017-
|
12
|
+
date: 2017-05-23 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: nokogiri
|
@@ -104,7 +104,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
104
104
|
version: '0'
|
105
105
|
requirements: []
|
106
106
|
rubyforge_project:
|
107
|
-
rubygems_version: 2.
|
107
|
+
rubygems_version: 2.6.12
|
108
108
|
signing_key:
|
109
109
|
specification_version: 4
|
110
110
|
summary: Helpers for processing content through a chain of filters
|