markdown_helper 2.5.1 → 2.5.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/markdown_helper/markdown_includer.rb +8 -5
- data/lib/markdown_helper/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: aa03a64373ee4630aad5ec0a3ce8d42597b53c23179ecfb05c159382cdca125a
|
4
|
+
data.tar.gz: f84f08d3021da11b6f2d0757794eb46198b8a40243671b34b2f13ce931013526
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d73cc10c181eebabe05a20cf935f5063304b2b6fc66afe31e48975e05366494141a159455cf159c97a91326b773f417ce80af408057798fc34cfe7fe4116f1a6
|
7
|
+
data.tar.gz: 173d97ed8df7fc42cab0706e002a2a7f39c5637fdb9f25c5516eb89599148a7923285decdabb4d9f38e38888e568aa28d39b31d30ed61d603055971b3827533a
|
data/Gemfile.lock
CHANGED
@@ -25,8 +25,10 @@ class MarkdownIncluder < MarkdownHelper
|
|
25
25
|
end
|
26
26
|
|
27
27
|
def gather_markdown(template_file_path)
|
28
|
-
|
29
|
-
|
28
|
+
template_dir_path = File.dirname(template_file_path)
|
29
|
+
template_file_name = File.basename(template_file_path)
|
30
|
+
Dir.chdir(template_dir_path) do
|
31
|
+
check_template(template_file_name)
|
30
32
|
markdown_lines = []
|
31
33
|
template_lines = File.readlines(template_file_path)
|
32
34
|
template_lines.each_with_index do |template_line, i|
|
@@ -100,8 +102,9 @@ class MarkdownIncluder < MarkdownHelper
|
|
100
102
|
def include_all(includer_file_path, page_toc_lines, is_nested, output_lines)
|
101
103
|
includer_dir_path = File.dirname(includer_file_path)
|
102
104
|
includer_file_name = File.basename(includer_file_path)
|
105
|
+
absolute_includer_file_path = File.absolute_path(includer_file_path)
|
103
106
|
Dir.chdir(includer_dir_path) do
|
104
|
-
check_template(
|
107
|
+
check_template(includer_file_name)
|
105
108
|
template_lines = File.readlines(includer_file_name)
|
106
109
|
if is_nested
|
107
110
|
add_inclusion_comments(':markdown', includer_file_path, template_lines)
|
@@ -117,7 +120,7 @@ class MarkdownIncluder < MarkdownHelper
|
|
117
120
|
next
|
118
121
|
end
|
119
122
|
inclusion = Inclusion.new(
|
120
|
-
includer_file_path:
|
123
|
+
includer_file_path: absolute_includer_file_path,
|
121
124
|
include_pragma: template_line,
|
122
125
|
includer_line_number: i,
|
123
126
|
treatment: treatment,
|
@@ -176,7 +179,7 @@ class MarkdownIncluder < MarkdownHelper
|
|
176
179
|
|
177
180
|
def check_template(template_file_path)
|
178
181
|
unless File.readable?(template_file_path)
|
179
|
-
path_in_project = MarkdownHelper.path_in_project(template_file_path
|
182
|
+
path_in_project = MarkdownHelper.path_in_project(template_file_path)
|
180
183
|
message = [
|
181
184
|
"Could not read template file: #{path_in_project}",
|
182
185
|
MarkdownIncluder.backtrace_inclusions(@inclusions),
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: markdown_helper
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.5.
|
4
|
+
version: 2.5.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- burdettelamar
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-12-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|