md2conf 0.2.1 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0f4ef4875e0ebf0de39c272cddeefbcb941934dc
4
- data.tar.gz: 9874b36255db0b75bbde30df9f0575dca177d91a
3
+ metadata.gz: 6fbab1393d0cc06d12233084f77b1888798d7128
4
+ data.tar.gz: fcc3c2a937b5273462c56d734f16dace53fbe518
5
5
  SHA512:
6
- metadata.gz: afea23bd30ff26b3810191a8838f96753140bd71fbda52aa212288589c0529e32453b96c9f89c7470226cb24952c0d083cfb7c31251322deaf446a0b510cd0b1
7
- data.tar.gz: ba5fe303ece6ce18b0d6f6013c1ed974d277134297f6da7f486f8542c72705c9485a7439e8fc226728b08c30b6e89730aa81a6f9d29257cc99c5e19ac80a5005
6
+ metadata.gz: db786ca2cbd485afc60c08e2d8bcd4054d48ff0fba31df88ea2315578692a0abe4f68a1fb6842e948db09baa76022715350866a2a5aebbbe18c44257ebec17d4
7
+ data.tar.gz: 97640d1c900aa716fe582fb7b6382193238de1459f2d701cfaa72f6ed50efc760acbc6bcfa728ea70229d3c2749937cd7b9a4f6d853f9a1b7303c9fd7e8ac7dc
@@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
4
4
  The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
5
5
  and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
6
6
 
7
+ ## [0.2.2] - 2017-09-27
8
+ ### Added
9
+ - Ability to disable ToC if max_toc_level == 0.
10
+
7
11
  ## [0.2.1] - 2017-08-30
8
12
  ### Fixed
9
13
  - Fixed an off-by-one bug in `process_macros()` method.
@@ -52,7 +52,7 @@ module Md2conf
52
52
 
53
53
  since_last_match = @html[last_position..Regexp.last_match.begin(0) - 1]
54
54
  html_new << "#{since_last_match}#{confluence_code}"
55
- last_position = Regexp.last_match.end(1) + 1
55
+ last_position = Regexp.last_match.end(0)
56
56
  end
57
57
 
58
58
  # Did we have at least one match?
@@ -155,6 +155,7 @@ module Md2conf
155
155
  #
156
156
  # Use @max_toc_level class variable to specify maximum header depth.
157
157
  def add_toc
158
+ return if @max_toc_level == 0
158
159
  @html = <<~HTML
159
160
  <ac:structured-macro ac:name="toc">
160
161
  <ac:parameter ac:name="maxLevel">#{@max_toc_level}</ac:parameter>
@@ -1,3 +1,3 @@
1
1
  module Md2conf
2
- VERSION = '0.2.1'.freeze
2
+ VERSION = '0.2.2'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: md2conf
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eugene Piven
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2017-08-30 00:00:00.000000000 Z
12
+ date: 2017-09-27 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler