vimwiki_markdown 0.2.1 → 0.2.3
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/README.md +6 -0
- data/changelog.md +3 -0
- data/lib/vimwiki_markdown/version.rb +1 -1
- data/lib/vimwiki_markdown/wiki_body.rb +1 -2
- data/spec/lib/vimwiki_markdown/wiki_body_spec.rb +7 -0
- 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: b1eedf430b8b2d456f161be94b5e8442fc067c65
|
4
|
+
data.tar.gz: c93a44f60628a554df3f3b988b8b8fdae2814c96
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 78fa1cd9bb2c713edcc40858970b6c9c72a309233b371bfed8b0f0ec4fb1230871a4192aa16782eb07dd084369e13f27a10f95e39a1d14b1a3275532ebae6a8f
|
7
|
+
data.tar.gz: 8cbbaef17fd634549ef9f24e688480bfd9d50e48156b012a5e614fcf4fbc50d678d3d9cfba68ab981b3a8f275cfc5ccd8719e58dafc0ae33300e546de0cd7ca5
|
data/README.md
CHANGED
@@ -52,6 +52,12 @@ and ensure that before the closing </head> tag you put
|
|
52
52
|
|
53
53
|
A sample tpl file is available here https://raw.githubusercontent.com/patrickdavey/vimwiki_markdown/master/example_files/default.tpl
|
54
54
|
|
55
|
+
#### Optional %root_html% marker.
|
56
|
+
|
57
|
+
You can also have a `%root_html%` marker in your template file, thanks
|
58
|
+
to [this commit](https://github.com/patrickdavey/vimwiki_markdown/commit/8645883b96df9962aba616d0d12961285cd3f4d7).
|
59
|
+
It will get rewritten with the relative path to the root
|
60
|
+
of the site (e.g. `./` or `../../` etc)
|
55
61
|
|
56
62
|
## Contributing
|
57
63
|
|
data/changelog.md
CHANGED
@@ -55,10 +55,9 @@ class VimwikiMarkdown::WikiBody
|
|
55
55
|
end
|
56
56
|
|
57
57
|
def convert_markdown_local_links!
|
58
|
-
@markdown_body.gsub
|
58
|
+
@markdown_body = @markdown_body.gsub(/\[.*?\]\(.*?\)/) do |match|
|
59
59
|
VimwikiMarkdown::VimwikiLink.new(match, options.input_file, options.extension, options.root_path).to_s
|
60
60
|
end
|
61
|
-
|
62
61
|
end
|
63
62
|
|
64
63
|
end
|
@@ -31,6 +31,13 @@ module VimwikiMarkdown
|
|
31
31
|
allow(wiki_body).to receive(:get_wiki_markdown_contents).and_return("hello")
|
32
32
|
expect(wiki_body.to_s).to match(/hello/)
|
33
33
|
end
|
34
|
+
|
35
|
+
it "must convert multiple links on the same line correctly" do
|
36
|
+
allow(wiki_body).to receive(:get_wiki_markdown_contents).and_return("[here](here) [there](there)")
|
37
|
+
allow_any_instance_of(VimwikiMarkdown::VimwikiLink).to receive(:vimwiki_markdown_file_exists?).and_return(true)
|
38
|
+
expect(wiki_body.to_s).to match(/<a href="here.html">here<\/a>/)
|
39
|
+
expect(wiki_body.to_s).to match(/<a href="there.html">there<\/a>/)
|
40
|
+
end
|
34
41
|
end
|
35
42
|
|
36
43
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vimwiki_markdown
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Patrick Davey
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-12-
|
11
|
+
date: 2016-12-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|