vimwiki_markdown 0.3.3 → 0.4.0

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: 3645fe30ab3bb81638bf374ee0299069ceee5680889609a6ae65bba411f1b4a6
4
- data.tar.gz: 14e2433a0fdd60bb0cda3a424996746f85b3c07a2c8e846c24a0a4573d52d8ce
3
+ metadata.gz: d897f72d7a0477abd0949c827322a0eb03fdef2e25ef49a81924b553aa9b0735
4
+ data.tar.gz: a78cb0793eda1cd773a139022bfca5aa1ba60e97f918a3887f76069d5c1c15d7
5
5
  SHA512:
6
- metadata.gz: e3afa0beac17b69d85c6aba84d2f2bf5f63925d84b0bd9867e2c210d151706416bcc330c58695975fde7abfd16934b702769696d7bacdf07d72ac176406004ca
7
- data.tar.gz: 6557dfcd016610ddc5360478be922ffbf14ccc31182f4c1dde589800804a632900c89191a12e50132a42c0cda96c46c0abbf3eb34755366a2b0636fd1d475112
6
+ metadata.gz: 312339f34d280767d0e34be1ceb4590f1545802145b70b4c4724b9550242e0f36a54021071c1dbc7bfe6c26aba3800c327fe909e4469c7ed75fb0d69fcec80b6
7
+ data.tar.gz: fd739c1f256ef9ed1997de16f36ec03a77ea1c37e11aced19f9ec0c34b2996b6e72d1de88126c0cb133e5057b75a548ca7a83f860f35f729b148b456a15d7eb0
@@ -0,0 +1,2 @@
1
+ ruby:
2
+ config_file: .rubocop.yml
@@ -0,0 +1,74 @@
1
+ AllCops:
2
+ TargetRubyVersion: 2.3
3
+
4
+ Style/StringLiterals:
5
+ EnforcedStyle: double_quotes
6
+
7
+ Style/DoubleNegation:
8
+ Enabled: false
9
+
10
+ Style/AndOr:
11
+ EnforcedStyle: conditionals
12
+
13
+ Style/SymbolArray:
14
+ Enabled: false
15
+
16
+ Style/SafeNavigation:
17
+ Enabled: false
18
+
19
+ Layout/IndentHeredoc:
20
+ Enabled: false
21
+
22
+ Layout/FirstParameterIndentation:
23
+ EnforcedStyle: consistent
24
+
25
+ Rails/DynamicFindBy:
26
+ Enabled: false
27
+
28
+ Layout/EmptyLines:
29
+ Enabled: false
30
+
31
+ Style/NumericLiterals:
32
+ Enabled: false
33
+
34
+ Style/FrozenStringLiteralComment:
35
+ Enabled: false
36
+
37
+ Style/RaiseArgs:
38
+ EnforcedStyle: compact
39
+
40
+ Documentation:
41
+ Enabled: false
42
+
43
+ Metrics/LineLength:
44
+ Exclude:
45
+ - spec/**/*
46
+ Max: 120
47
+
48
+ Metrics/BlockLength:
49
+ Exclude:
50
+ - 'Rakefile'
51
+ - 'spec/**/*.rb'
52
+
53
+ Lint/AmbiguousBlockAssociation:
54
+ Exclude:
55
+ - "spec/**/*"
56
+
57
+ Layout/MultilineMethodCallIndentation:
58
+ Enabled: true
59
+ EnforcedStyle: indented
60
+ SupportedStyles:
61
+ - aligned
62
+ - indented
63
+
64
+ Metrics/AbcSize:
65
+ Enabled: true
66
+ Max: 20
67
+
68
+ Metrics/MethodLength:
69
+ Enabled: true
70
+ CountComments: false
71
+ Max: 20
72
+ Exclude:
73
+ - "spec/**/*"
74
+
data/README.md CHANGED
@@ -18,15 +18,18 @@ Install the vimwiki_markdown gem
18
18
 
19
19
  ## Setup
20
20
 
21
+ vimwiki_markdown works best with a recent version of [vimwiki](https://github.com/vimwiki/vimwiki). Use the `dev` branch for best results.
22
+
21
23
  Ensure that your vimiwiki directive in your .vimrc is setup for markdown. For
22
24
  this we use the custom_wiki2html parameter. My .vimrc looks like this:
23
25
 
24
26
  let g:vimwiki_list = [{'path': '~/vimwiki', 'template_path': '~/vimwiki/templates/',
25
27
  \ 'template_default': 'default', 'syntax': 'markdown', 'ext': '.md',
26
28
  \ 'path_html': '~/vimwiki/site_html/', 'custom_wiki2html': 'vimwiki_markdown',
29
+ \ 'html_filename_parameterization': 1,
27
30
  \ 'template_ext': '.tpl'}]
28
31
 
29
- The most important part is the *'custom_wiki2html': 'vimwiki_markdown'*
32
+ The most important parts are the *'custom_wiki2html': 'vimwiki_markdown'* and the *'html_filename_parameterization': 1*. The custom_wiki2html tells vimwiki to use this gem for creating html, the html_filename_parameterization tells vimwiki to match the filenames that vimwiki_markdown produces.
30
33
 
31
34
  ### Install issues.
32
35
  There have been some issues with getting dependencies installed. Before opening an issue, please check if you can use [rvm](http://rvm.io/) to install the gem, as RVM is magic and makes everything work ;)
@@ -68,12 +71,6 @@ more interesting vimwiki links (e.g. :local etc.)
68
71
  4. Push to the branch (`git push origin my-new-feature`)
69
72
  5. Create a new Pull Request
70
73
 
71
- ## Known Issues
72
-
73
- In the `vimwiki_markdown` gem, links are written out using Rails' paramaterized method. That is, a link like "my awesome link" is turned into "my-awesome-link". Vimwikis built-in support for
74
- checking whether a file needs to be re-generated or not uses a mixture of timestamp and whether the output file exists. Unfortunately, vimwiki _doesn't_ paramaterize their output files, so, quite often there's
75
- a mismatch in terms of whether a file exists. I had patched previous version of vimwiki, but, I haven't done it with the latest version. If you _want_ to look at it, there's [some information in a previous version of this README](https://github.com/patrickdavey/vimwiki_markdown/blob/4cf18a3fb329895e2062a1a56c83074d215e93c4/README.md#fix-for-vimwiki-links), but, you're on your own ;)
76
-
77
74
  ## License
78
75
 
79
76
  [MIT License](http://opensource.org/licenses/mit-license.php)
@@ -1,5 +1,9 @@
1
+ ## 0.4.0 [June 16 2019]
2
+ Support HTML tags in markdown content again.
3
+
1
4
  ## 0.3.3 [March 29 2019]
2
5
  Support for %date% and %nohtml tags
6
+ Add information about html_filename_parameterization.
3
7
 
4
8
  ## 0.3.2 [March 28 2019]
5
9
 
@@ -1,3 +1,3 @@
1
1
  module VimwikiMarkdown
2
- VERSION = "0.3.3"
2
+ VERSION = "0.4.0"
3
3
  end
@@ -15,8 +15,10 @@ class VimwikiMarkdown::WikiBody
15
15
  fixlinks
16
16
  html = GitHub::Markup.render_s(
17
17
  GitHub::Markups::MARKUP_MARKDOWN,
18
- markdown_body
18
+ markdown_body,
19
+ options: { commonmarker_opts: [:UNSAFE] }
19
20
  )
21
+
20
22
  pipeline = HTML::Pipeline.new([
21
23
  HTML::Pipeline::SyntaxHighlightFilter,
22
24
  HTML::Pipeline::TableOfContentsFilter
@@ -33,6 +33,12 @@ module VimwikiMarkdown
33
33
  expect(wiki_body.to_s).to match(/hello/)
34
34
  end
35
35
 
36
+ it "must convert html content correctly" do
37
+ allow_any_instance_of(VimwikiMarkdown::VimwikiLink).to receive(:vimwiki_markdown_file_exists?).and_return(true)
38
+ allow(wiki_body).to receive(:get_wiki_markdown_contents).and_return("<p>hello world</p>")
39
+ expect(wiki_body.to_s).to include("<p>hello world</p>")
40
+ end
41
+
36
42
  it "must convert multiple links on the same line correctly" do
37
43
  allow(wiki_body).to receive(:get_wiki_markdown_contents).and_return("[here](here) [there](there)")
38
44
  allow_any_instance_of(VimwikiMarkdown::VimwikiLink).to receive(:vimwiki_markdown_file_exists?).and_return(true)
@@ -25,10 +25,11 @@ Gem::Specification.new do |spec|
25
25
  spec.add_development_dependency "rspec-its", "~> 1.1"
26
26
  spec.add_development_dependency "rspec-html-matchers", "~> 0.6.1"
27
27
  spec.add_development_dependency "guard-rspec", "~> 4.3"
28
+ spec.add_development_dependency "rubocop"
28
29
 
29
30
  spec.add_runtime_dependency "activesupport", "~> 4.1"
30
31
  spec.add_runtime_dependency "github-markup", "~> 3.0"
31
- spec.add_runtime_dependency "commonmarker", "~> 0.18.0"
32
+ spec.add_runtime_dependency "commonmarker", "~> 0.20"
32
33
  spec.add_runtime_dependency "html-pipeline", "~> 2.0"
33
34
  spec.add_runtime_dependency "rouge", "~> 3.3"
34
35
  spec.add_runtime_dependency "escape_utils", "~> 1.2"
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.3.3
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Patrick Davey
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-03-29 00:00:00.000000000 Z
11
+ date: 2019-06-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -108,6 +108,20 @@ dependencies:
108
108
  - - "~>"
109
109
  - !ruby/object:Gem::Version
110
110
  version: '4.3'
111
+ - !ruby/object:Gem::Dependency
112
+ name: rubocop
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - ">="
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - ">="
123
+ - !ruby/object:Gem::Version
124
+ version: '0'
111
125
  - !ruby/object:Gem::Dependency
112
126
  name: activesupport
113
127
  requirement: !ruby/object:Gem::Requirement
@@ -142,14 +156,14 @@ dependencies:
142
156
  requirements:
143
157
  - - "~>"
144
158
  - !ruby/object:Gem::Version
145
- version: 0.18.0
159
+ version: '0.20'
146
160
  type: :runtime
147
161
  prerelease: false
148
162
  version_requirements: !ruby/object:Gem::Requirement
149
163
  requirements:
150
164
  - - "~>"
151
165
  - !ruby/object:Gem::Version
152
- version: 0.18.0
166
+ version: '0.20'
153
167
  - !ruby/object:Gem::Dependency
154
168
  name: html-pipeline
155
169
  requirement: !ruby/object:Gem::Requirement
@@ -202,7 +216,9 @@ extensions: []
202
216
  extra_rdoc_files: []
203
217
  files:
204
218
  - ".gitignore"
219
+ - ".hound.yml"
205
220
  - ".rspec"
221
+ - ".rubocop.yml"
206
222
  - ".travis.yml"
207
223
  - Gemfile
208
224
  - Guardfile