extended-markdown-filter 0.3.1 → 0.3.2

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: 5e39736b7db330ed79b07670dfe2700318ecb02a
4
- data.tar.gz: 0026e0d7a541c4724d93d4f115dca0a333e3056d
3
+ metadata.gz: ebf3600fdef64938f9d5d69eaa314cb100f11200
4
+ data.tar.gz: 0909a41e8ece4890b88d0e284afb6a4074fb1f33
5
5
  SHA512:
6
- metadata.gz: d092540fe47c5d2cd8b6712a516acbd8904e9ccedb18670baf427243fde25e1663a035b5bada89e05c333d2208cda883e05dd6fb15e830c6fd7eef500d050cf6
7
- data.tar.gz: 3cad92de7d0d29637ecbf485bc0c09ccc2f075622b78af197361e7328fe9dd2666fda2060c19a600b437a78bcf561d43654fdaeb4da28ed47db6faeb35231357
6
+ metadata.gz: c53425088bb68ea1bd5e4c7bc22710be276519ff4b904c2531b2b3429ead5ba5ac03a219d047002639d60c74d43f75b1c5d5847ab9d57443a7fb2392ba225bb5
7
+ data.tar.gz: 1be298c931dea41b5ab48024868a2cc614e4cd8ccfcb6b0282e441cf2dae87794eb5246c63dc078e5a1f9f5e15a9d00cfed0904528b6e188d05248a73b61890e
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = "extended-markdown-filter"
3
- spec.version = "0.3.1"
3
+ spec.version = "0.3.2"
4
4
  spec.authors = ["Garen Torikian"]
5
5
  spec.email = ["gjtorikian@gmail.com"]
6
6
  spec.summary = %q{Add extended markup syntax to the HTML::Pipeline}
@@ -1,11 +1,11 @@
1
1
  require 'html/pipeline'
2
2
  require 'filters/filters'
3
3
 
4
- Dir[File.join("#{File.expand_path(File.dirname(__FILE__))}", "filters", "pre", "*.rb")].each do |file|
4
+ Dir[File.join(File.expand_path(File.dirname(__FILE__)), "filters", "pre", "*.rb")].each do |file|
5
5
  require file
6
6
  end
7
7
 
8
- Dir[File.join("#{File.expand_path(File.dirname(__FILE__))}", "filters", "post", "*.rb")].each do |file|
8
+ Dir[File.join(File.expand_path(File.dirname(__FILE__)), "filters", "post", "*.rb")].each do |file|
9
9
  require file
10
10
  end
11
11
 
@@ -1,15 +1,16 @@
1
1
  # Liquid disregards tags it doesn't know,
2
2
  # so rather than define a new format for additions like {{#tip}},
3
- # we'll convert them to block form
3
+ # we'll convert them to bracket form
4
4
  module Jekyll
5
- class Page
6
- old_render = self.instance_method(:render)
5
+ class Renderer
6
+ alias_method :old_run, :run
7
7
 
8
- define_method(:render) do |layouts, site_payload|
9
- unless self.content.nil?
10
- self.content = ExtendedMarkdownFilter.convert_curly_to_bracket(self.content)
8
+ def run
9
+ html_pipeline_context = site.site_payload["site"]["html_pipeline"] && site.site_payload["site"]["html_pipeline"]["context"]
10
+ if site.site_payload["site"]["markdown"] == "HTMLPipeline" && html_pipeline_context && site.site_payload["site"]["html_pipeline"]["context"][:emf_use_blocks]
11
+ document.content = ExtendedMarkdownFilter.convert_curly_to_bracket(document.content)
11
12
  end
12
- old_render.bind(self).call(layouts, site_payload)
13
+ old_run
13
14
  end
14
15
  end
15
16
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: extended-markdown-filter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Garen Torikian
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-09-15 00:00:00.000000000 Z
11
+ date: 2014-09-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: html-pipeline