content-pipeline 1.3.0 → 1.3.1

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: 99982146710eb42b199f6f0d9af72351654c2477
4
- data.tar.gz: 93180e18ff0229a46cd1d21cc78ddf42b4d4e780
3
+ metadata.gz: 7f5f5bbc2443cdb2521b738fae3f0541548103ae
4
+ data.tar.gz: 04a7408dd1fd130cee92d2475c920e806279acd8
5
5
  SHA512:
6
- metadata.gz: 24cef63ca9907370b1f6809eef8464806e75a97df2370100681d33aac94245d31108623f9db673ed7353f6849468de1c8bbd98351df59c71a249c29b85877210
7
- data.tar.gz: bf3541baf1aa6e64118515e75a3e17b2ec18acc2d5c5cdf3c35bdd1f3b00161c20b60bf32d3e498de548bee18632ccc9540e0949832bf35258760c0d3d459542
6
+ metadata.gz: c443550d1219ab09e0f0df54c7f050ab4e87b4a269f789b3b1127d19e9e8d174f0ed9702f1818b3838b0bf78b0ccc2ac8ce9614a1088a56a1a817dce46c48afd
7
+ data.tar.gz: cc77fd8d041ed307b516a25ccf8c1a8671b63550459a5eb445805933e4057686f0f3ee6848d9feb8c6f98cd6dae6b7979c64245e83f015a2ce1de003e3e9e04c
data/Readme.md CHANGED
@@ -59,10 +59,10 @@ Content::Pipeline.new.filter('# Markdown')
59
59
  ```
60
60
 
61
61
  * Supports global options with overrides.
62
- * By default uses `CodeHighlight`, `Markdown`, `Gemoji`.
62
+ * By default uses only `Markdown`.
63
63
  * Supports multiple Markdowns.
64
64
 
65
- *It should be noted that if you send a list of filters you wish to use, it will not use the default filters at all. So where you see `[ MyFilter ]` that will be the only filter that is ran, since it automatically assumes this is the pipeline you wish to use.*
65
+ *It should be noted that if you send a list of filters you wish to use, it will not use the default filter at all. So where you see `[ MyFilter ]` that will be the only filter that is ran, since it automatically assumes this is the pipeline you wish to use.*
66
66
 
67
67
  ### Filter Options
68
68
 
@@ -41,9 +41,11 @@ class Content::Pipeline::Filters::CodeHighlight < Content::Pipeline::Filter
41
41
  private
42
42
  def highlight
43
43
  @str = @str.to_nokogiri_fragment
44
- @str.search("pre").each do |node|
45
- lang = node[:lang] || @opts[:default] || "ruby"
46
- node.replace Templates[:wrap] % wrap(pygments(node.inner_text, lang), lang)
44
+ @str.search("pre>code").each do |node|
45
+ lang = node[:class] || node.parent[:lang] || @opts[:default] || "ruby"
46
+ node.parent.replace(
47
+ Templates[:wrap] % wrap(pygments(node.inner_text, lang), lang)
48
+ )
47
49
  end
48
50
  end
49
51
 
@@ -12,7 +12,7 @@ class Content::Pipeline::Filters::Markdown < Content::Pipeline::Filter
12
12
 
13
13
  private
14
14
  def default
15
- jruby? ? :kramdown : :gfm
15
+ jruby? ? :kramdown : :redcarpet
16
16
  end
17
17
 
18
18
  private
@@ -51,7 +51,8 @@ class Content::Pipeline::Filters::Markdown < Content::Pipeline::Filter
51
51
  private
52
52
  def parse_github
53
53
  require "github/markdown"
54
- GitHub::Markdown.to_html(@str, @type).strip
54
+ type = @type == :github ? :gfm : @type
55
+ GitHub::Markdown.to_html(@str, type).strip
55
56
  end
56
57
 
57
58
  private
@@ -1,5 +1,5 @@
1
1
  module Content
2
2
  class Pipeline
3
- VERSION = "1.3.0"
3
+ VERSION = "1.3.1"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: content-pipeline
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.0
4
+ version: 1.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jordon Bedwell
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-08-29 00:00:00.000000000 Z
11
+ date: 2014-12-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri
@@ -119,7 +119,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
119
119
  version: '0'
120
120
  requirements: []
121
121
  rubyforge_project:
122
- rubygems_version: 2.4.1
122
+ rubygems_version: 2.2.2
123
123
  signing_key:
124
124
  specification_version: 4
125
125
  summary: Adds a pipeline for your content.