content-pipeline 1.3.2 → 1.3.4

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: 9ac257d7d41f69f56e2b7f40ce1e96b40e8c3eee
4
- data.tar.gz: 483fd532422f2656e6c374d82e86599a4d898544
3
+ metadata.gz: 6b4b0982ef176f0d8a4ea76280b9bb6a6dfcb4f6
4
+ data.tar.gz: 9f0b3a9c087f769cd18a13b333aacdd242af217b
5
5
  SHA512:
6
- metadata.gz: d864c0b861e4ff9d9a0b0c4ae94fde0e0ac7cded86e4737561a993d214f5e3f25875b40d457e3de605f727c6200ad11ce0e17fb3b5c91c4a0ea99efa9faefce8
7
- data.tar.gz: 612d4fe5c3d2cd9a2fe7396f5040f4da363262ae060f36ce1ace8fa157ebaf13a3622ca34d40073c76effb3b44aa1d8c2ed6c6ed399ce106be4251685b679dd0
6
+ metadata.gz: 16d22aea4add4aebf1ea3b819e95dc2cbd2264933512d214ce66b8a3f7ae035633a1072d7521959083f889de66cb1be9ff47c43b4729fc486e68f54f910d7c52
7
+ data.tar.gz: 944a1eefa1169c67126801c0e154a16bfa9737dd4e59900cc925ee492e23587b72e83c9a0101f25bac878b5d4b2130e146b80fc5f1d3a54e4dbc4c9bef2c6b1b
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
 
@@ -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.2"
3
+ VERSION = "1.3.4"
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.2
4
+ version: 1.3.4
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-09-06 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.