extended-markdown-filter 0.3.7 → 0.3.8
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/extended-markdown-filter.gemspec +1 -1
- data/lib/extended-markdown-filter.rb +3 -5
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 651395f35ffea902b5f94d90025eb0f89b0a298e
|
|
4
|
+
data.tar.gz: 7f2bcff4ff50b4047d8cff124462b5db10172ffa
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a9c9a7bca9e6980c2a4ef486b816d219e84e0c25ebfe82b74372d77b53e3e2c51504550bec6cca56235e7c61a3a2157d048815f1d02eccb44352c29f390db428
|
|
7
|
+
data.tar.gz: e83462cac87a087926e70ca568da70f955dbcaa89fa39e0a92a13ae5c4701ec6151f9eec5d5b84a6477b643058b22cb56afbe4af1183c7db4cd9802ea71e199d
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Gem::Specification.new do |spec|
|
|
2
2
|
spec.name = "extended-markdown-filter"
|
|
3
|
-
spec.version = "0.3.
|
|
3
|
+
spec.version = "0.3.8"
|
|
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,6 +1,7 @@
|
|
|
1
1
|
require 'html/pipeline'
|
|
2
2
|
require 'filters/filters'
|
|
3
3
|
require 'nokogiri'
|
|
4
|
+
require 'jekyll-override' unless defined?(Jekyll).nil?
|
|
4
5
|
|
|
5
6
|
Dir[File.join(File.expand_path(File.dirname(__FILE__)), "filters", "pre", "*.rb")].each do |file|
|
|
6
7
|
require file
|
|
@@ -17,10 +18,6 @@ class ExtendedMarkdownFilter < HTML::Pipeline::MarkdownFilter
|
|
|
17
18
|
EMF_CURLY_TAGS = %w(intro mac windows linux all tip warning error).join('|')
|
|
18
19
|
|
|
19
20
|
def initialize(text, context = nil, result = nil)
|
|
20
|
-
if defined?(Jekyll) && context[:emf_use_blocks]
|
|
21
|
-
require 'jekyll-override'
|
|
22
|
-
end
|
|
23
|
-
|
|
24
21
|
if context[:emf_use_blocks]
|
|
25
22
|
text = self.class.convert_curly_to_bracket(text)
|
|
26
23
|
end
|
|
@@ -45,7 +42,8 @@ class ExtendedMarkdownFilter < HTML::Pipeline::MarkdownFilter
|
|
|
45
42
|
|
|
46
43
|
def self.should_jekyll_replace?(site)
|
|
47
44
|
html_pipeline_context = site.site_payload["site"]["html_pipeline"] && site.site_payload["site"]["html_pipeline"]["context"]
|
|
48
|
-
site.site_payload["site"]["
|
|
45
|
+
pipeline_emf_context = site.site_payload["site"]["html_pipeline"]["context"][:emf_use_blocks] || site.site_payload["site"]["html_pipeline"]["context"]["emf_use_blocks"]
|
|
46
|
+
site.site_payload["site"]["markdown"] == "HTMLPipeline" && html_pipeline_context && pipeline_emf_context
|
|
49
47
|
end
|
|
50
48
|
|
|
51
49
|
def call
|
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.
|
|
4
|
+
version: 0.3.8
|
|
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-
|
|
11
|
+
date: 2014-12-28 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: html-pipeline
|