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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 906fabd0c29669e95009a6d932f85972836e245b
4
- data.tar.gz: 2dcb95b6af6aee3c52998f5fa336129f87edfecf
3
+ metadata.gz: b1eedf430b8b2d456f161be94b5e8442fc067c65
4
+ data.tar.gz: c93a44f60628a554df3f3b988b8b8fdae2814c96
5
5
  SHA512:
6
- metadata.gz: 6970110fe34db2557327ead5bc447075f18904977047bb08686be834a3ded04622927e7665d5ab28f69241e1ec12bf7b4efe9488045d1eb58a1d93563a964475
7
- data.tar.gz: dc78376885a59561e34b1d9d3dd2e0aa692efe4c7ef053032231b29b4ced5c59c53345e86a961756113f6a8aca7c6246799ac45e50915bee9dd72c44c9471227
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
@@ -1,3 +1,6 @@
1
+ ## 0.2.3 [December 15th 2016]
2
+ Bugfix - multiple links on the same line were not processed correctly.
3
+
1
4
  ## 0.2.1 [December 15th 2016]
2
5
  Allow %root_path% substitution in template file.
3
6
 
@@ -1,3 +1,3 @@
1
1
  module VimwikiMarkdown
2
- VERSION = "0.2.1"
2
+ VERSION = "0.2.3"
3
3
  end
@@ -55,10 +55,9 @@ class VimwikiMarkdown::WikiBody
55
55
  end
56
56
 
57
57
  def convert_markdown_local_links!
58
- @markdown_body.gsub!(/\[.*\]\(.*\)/) do |match|
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.1
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-15 00:00:00.000000000 Z
11
+ date: 2016-12-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler