html-pipeline 2.5.0 → 2.6.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 36a4211b5ddd8a4679ac77a293f2dcf2b3b0be77
4
- data.tar.gz: dd973b021aff56b932858d9941ac362c359e63a8
3
+ metadata.gz: 4331ea961008327c8a6a060c0c3c44ce412e7435
4
+ data.tar.gz: 7a4579b7a5b1f9e838b8db0527658528eaeb1527
5
5
  SHA512:
6
- metadata.gz: c17fbf3322c6de37d616901aa41cd6c1fc11b02bfb5d3118cde30451e87719d591707da4589024e17e0ae21591ea9e6e8c82f2cdfe17c5848c4902abe05ecb48
7
- data.tar.gz: 6ed19c3cf342ff30b07505955b14007ab0e65ec1eb149639d0762aed3a475d90ef29da46829abf68ee3b95f9f81c4f9a90d5a68027f6c5ede50a552bb78bb1a0
6
+ metadata.gz: ba87020a503a6f84766b0df1d23522064bcd2a7ba63bdf79151dc8c93807302d3d03fcfda9f13365fe660025f7961b5a1a7a45b326a58b56667a6d7d841d809b
7
+ data.tar.gz: fd4d5ef1ef9aee02c595dca5e4ea28e1470a2b38cf8c7994dcc5e7789c0a71eacd45bb9eec4dd65c1bd9817936db603786699cc9967d501c364bd58818fb15c9
data/.travis.yml CHANGED
@@ -6,6 +6,9 @@ addons:
6
6
  apt:
7
7
  sources:
8
8
  - libicu-dev
9
+ - kalakris-cmake
10
+ packages:
11
+ - cmake
9
12
 
10
13
  script: bundle exec rake
11
14
 
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 "github-markdown", "~> 0.5", :require => false
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` - `github-markdown`
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 || self.class.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 "github/markdown"
2
+ require "commonmarker"
3
3
  rescue LoadError => _
4
- raise HTML::Pipeline::MissingDependencyError, "Missing dependency 'github-markdown' for MarkdownFilter. See README.md for details."
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
- mode = (context[:gfm] != false) ? :gfm : :markdown
27
- html = GitHub::Markdown.to_html(@text, mode)
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
@@ -1,5 +1,5 @@
1
1
  module HTML
2
2
  class Pipeline
3
- VERSION = "2.5.0"
3
+ VERSION = "2.6.0"
4
4
  end
5
5
  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.5.0
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-01-13 00:00:00.000000000 Z
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.5.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