rdoc-markdown 0.16.0 → 0.16.1
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/CHANGELOG.md +2 -0
- data/Gemfile.lock +1 -1
- data/lib/rdoc/generator/markdown.rb +3 -2
- data/lib/rdoc/markdown/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 2ff64065c50e370a502784e01c59e86d8dd6490a6c28f87cfec28b3a22bcd235
|
|
4
|
+
data.tar.gz: 9c54ac15590b858a761bafb3fd1055925f19c3a6d783beff8c8d77dba984a953
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e754b47dd630557c3765a2407eee71edb7a106151436c9054dc0cab928afc35b68e65bab29ea158f847a92378251f37990487d6bdbfb0339fd824748e32bcb81
|
|
7
|
+
data.tar.gz: f8108d248d231e0d3c8066a687d9513570d38ddcfa47e917b330dc51ee7db8c512a85cad7acf1fced09856383e914e45d3f7c7cb5e38aa129ce5099aaa555e47
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
|
@@ -98,6 +98,7 @@ class RDoc::Generator::Markdown
|
|
|
98
98
|
def initialize(store, rdoc_options)
|
|
99
99
|
@store = store
|
|
100
100
|
@options = rdoc_options
|
|
101
|
+
@source_dir = File.expand_path(rdoc_options.root.to_s)
|
|
101
102
|
@markdown_unknown_tags = self.class.validate_markdown_unknown_tags(rdoc_options.markdown_unknown_tags)
|
|
102
103
|
end
|
|
103
104
|
|
|
@@ -223,7 +224,7 @@ class RDoc::Generator::Markdown
|
|
|
223
224
|
out_file = Pathname.new("#{output_dir}/#{page_output_path(page)}")
|
|
224
225
|
out_file.dirname.mkpath
|
|
225
226
|
|
|
226
|
-
next FileUtils.cp(page.absolute_name, out_file) if page.relative_name.end_with?(".md", ".markdown")
|
|
227
|
+
next FileUtils.cp(File.expand_path(page.absolute_name, @source_dir), out_file) if page.relative_name.end_with?(".md", ".markdown")
|
|
227
228
|
|
|
228
229
|
content = markdownify(render_description(page))
|
|
229
230
|
File.write(out_file, finalize_markdown(
|
|
@@ -719,7 +720,7 @@ class RDoc::Generator::Markdown
|
|
|
719
720
|
def normalize_input_path_for_output(path)
|
|
720
721
|
normalized = path.tr("\\", "/").sub(%r{\A\./}, "")
|
|
721
722
|
|
|
722
|
-
root =
|
|
723
|
+
root = @source_dir
|
|
723
724
|
normalized = normalized.sub(%r{\A#{Regexp.escape(root)}/}, "")
|
|
724
725
|
normalized = normalized.sub(%r{\A/}, "")
|
|
725
726
|
|