vimwiki_markdown 0.4.2 → 0.4.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
  SHA256:
3
- metadata.gz: c5a191248476c71d6d9f33309db8800da0a0d7405e89f13b58b10a58187f5fde
4
- data.tar.gz: 1220ed04bf3a24eab1598e31b974b1a101351b9e7e12a7314bc98a4b63434c79
3
+ metadata.gz: 9350bfdab384da03bd60949b18575b0d29b69df197e73370e5e20d5124a2105e
4
+ data.tar.gz: acf9164c1ff195e280364de0e3a341c618a7d892989a6d7702e6a7eab57bdd20
5
5
  SHA512:
6
- metadata.gz: f9cfce9007b1a2627f621a7d5e2c164ef022576460d430849983a672e04bf6d5a711291793f5b89da9c483e8993c295abd57a939e01c29a10a45234d96ad9c0e
7
- data.tar.gz: e00bb2831a4a8c7af9599e51d76a4d41d3aacf6cb00a7ad768e18e7771ab581b778881048dc0d2faeec54e26bad6ecc0a881da2c82600751745f87652b6956f5
6
+ metadata.gz: 25a3d1674dd3b8511ccc76e0be69b77e08a7aa87a311895019e0cb5649d65e37e4ef12423521318a4e35d6415e9bd205c9836f0b26233eab8a360b112cd85d2a
7
+ data.tar.gz: bdb112d177af8f0d5f039b847e9e94bd5d274aaf075b8a037ac7326f392c8393a4aac3fd6da18819c760066c447670d826b091b9c33d791b9f14e286a1994f3a
data/changelog.md CHANGED
@@ -1,3 +1,6 @@
1
+ ## 0.4.3 [June 16 2019]
2
+ temporarily revoke fragments until we're not altering old links
3
+
1
4
  ## 0.4.2 [June 16 2019]
2
5
  Allow "fragments" in markdown style links such as those generated by :VimwikiTOC or or when using a diary_caption_level.
3
6
  Thanks to @djeremiah - see https://github.com/patrickdavey/vimwiki_markdown/pull/23
@@ -1,3 +1,3 @@
1
1
  module VimwikiMarkdown
2
- VERSION = "0.4.2"
2
+ VERSION = "0.4.3"
3
3
  end
@@ -9,14 +9,13 @@
9
9
 
10
10
  module VimwikiMarkdown
11
11
  class VimwikiLink
12
- MARKDOWN_LINK_REGEX = /\[(?<title>.*)\]\((?<uri>(?:(?!#).)*)(?<fragment>(?:#)?.*)\)/
12
+ MARKDOWN_LINK_REGEX = /\[(?<title>.*)\]\((?<uri>.*)\)/
13
13
 
14
- attr_reader :title, :uri, :fragment, :source_markdown_directory, :markdown_extension, :root_path
14
+ attr_reader :title, :uri, :source_markdown_directory, :markdown_extension, :root_path
15
15
 
16
16
  def initialize(markdown_link, source_markdown_filepath, markdown_extension, root_path)
17
17
  @title = markdown_link.match(MARKDOWN_LINK_REGEX)[:title]
18
18
  @uri = markdown_link.match(MARKDOWN_LINK_REGEX)[:uri]
19
- @fragment = markdown_link.match(MARKDOWN_LINK_REGEX)[:fragment]
20
19
  @markdown_extension = markdown_extension
21
20
  @root_path = root_path
22
21
  @source_markdown_directory = Pathname.new(source_markdown_filepath).dirname
@@ -35,8 +34,6 @@ module VimwikiMarkdown
35
34
  path = Pathname.new(uri)
36
35
  @uri = "#{path.dirname + path.basename(markdown_extension).to_s.parameterize}.html"
37
36
  end
38
-
39
- @uri = "#{uri}#{fragment.empty? ? '' : '#' + fragment.parameterize}"
40
37
  end
41
38
 
42
39
  def vimwiki_markdown_file_exists?
@@ -13,14 +13,6 @@ module VimwikiMarkdown
13
13
  expect(link.uri).to eq("http://www.google.com")
14
14
  end
15
15
 
16
- it "should render fragment-only links correctly" do
17
- markdown_link = "[test](#Wiki Heading)"
18
-
19
- link = VimwikiLink.new(markdown_link, source_filepath, markdown_extension, root_path)
20
- expect(link.title).to eq("test")
21
- expect(link.uri).to eq("#wiki-heading")
22
- end
23
-
24
16
  context "with an existing markdown file matching name" do
25
17
  let(:existing_file) { "test#{markdown_extension}" }
26
18
  let(:existing_file_no_extension) { existing_file.gsub(/#{markdown_extension}$/,"") }
@@ -52,14 +44,6 @@ module VimwikiMarkdown
52
44
  expect(link.uri).to eq("#{existing_file_no_extension}.html")
53
45
  end
54
46
 
55
- it "must convert same-directory markdown links with url fragments correctly" do
56
- markdown_link = "[test](#{existing_file_no_extension}#Wiki Heading)"
57
-
58
- link = VimwikiLink.new(markdown_link, source_filepath, markdown_extension, root_path)
59
- expect(link.title).to eq("test")
60
- expect(link.uri).to eq("#{existing_file_no_extension}.html#wiki-heading")
61
- end
62
-
63
47
  context "subdirectory linked files" do
64
48
  let(:existing_file) { "subdirectory/test.md" }
65
49
 
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.4.2
4
+ version: 0.4.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: 2020-02-22 00:00:00.000000000 Z
11
+ date: 2020-02-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -260,8 +260,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
260
260
  - !ruby/object:Gem::Version
261
261
  version: '0'
262
262
  requirements: []
263
- rubyforge_project:
264
- rubygems_version: 2.7.9
263
+ rubygems_version: 3.0.4
265
264
  signing_key:
266
265
  specification_version: 4
267
266
  summary: Converts a github flavoured markdown vimwiki file into html.