wiki_md 0.7.0 → 0.7.1

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
  SHA256:
3
- metadata.gz: 39807ec060776358c5aced8404ef1ea984764344f62f3e2780fba7f643eb1ac5
4
- data.tar.gz: b3cf99153dd820c632300f47727c3201b657f500be7798cfbf62e6651b0e699a
3
+ metadata.gz: 88409f81fb682256d5bc53d1072ac521fa61e188ec78b216a6dfdc6b44747dab
4
+ data.tar.gz: 5499db6fce0e0275daf419755df91fedebf95b1f336dee957878611b13208e4b
5
5
  SHA512:
6
- metadata.gz: 77b76727a5f71fcbf949d93f87b992bf5f0b2ef774994a69b6e0b3301629f0e759d7fac63c0f95f3b4c76c03475894e55b390c560307c9052e229a809c6a67ff
7
- data.tar.gz: 46ed0505da571590568c795c8e5794a3edeb59470b80f5a67649789c9302a43f26f2bfd7dc80650615ed574cd84b96f15420e592b4d4e790351dc76b98e81e74
6
+ metadata.gz: 1a68168e9ee4a881262608783504cef543d11f64ed784c242fa210b72e498d69115080737e65f650e965f057a8e6f3a9d1af19c274b0a8758517354459139c18
7
+ data.tar.gz: 3adf48a46ec49cfad0108123b0a030f181f5507609363ba425466fb7c345783077294cc676adfe5b5af90328d6a799adf17462c79245c592f610e1a2f6d86ad9
checksums.yaml.gz.sig CHANGED
Binary file
data/lib/wiki_md.rb CHANGED
@@ -25,7 +25,7 @@ class WikiMd
25
25
  end
26
26
 
27
27
  def body=(s)
28
- text_entry = "%s\n\n%s\n\n%s" % [self.heading, s, self.footer]
28
+ text_entry = "# %s\n\n%s\n\n%s" % [self.heading, s, self.footer]
29
29
  self.x = text_entry
30
30
  end
31
31
 
@@ -75,12 +75,23 @@ class WikiMd
75
75
 
76
76
  end
77
77
 
78
- if type == :unknown and (s.lines.length == 1 and
79
- FileX.exists?(File.dirname(s))) then
78
+ if type == :unknown and s.lines.length == 1 then
79
+
80
+ #if FileX.exists?(File.dirname(s)) then
80
81
  puts 'before new_md()'.debug if debug
81
82
  new_md()
82
83
  @filename = wiki
83
84
 
85
+
86
+ @filepath = File.dirname @filename
87
+
88
+ indexfile = File.join(@filepath, 'index.xml')
89
+
90
+ # check for the index.xml file
91
+ @dx = load_index(indexfile)
92
+
93
+ save()
94
+
84
95
  elsif type == :file or type == :dfs
85
96
 
86
97
  @filename = wiki
@@ -139,7 +150,7 @@ class WikiMd
139
150
 
140
151
  record = {title: title + ' #' + tagline.lstrip.split.join(' #'),
141
152
  url: [@base_url, File.basename(@filename)[/.*(?=\.\w+)/],
142
- URI.escape(title)].join('/')}
153
+ URI.escape(title.gsub(/ /,'_'))].join('/')}
143
154
 
144
155
  @dx.create record
145
156
 
@@ -355,7 +366,7 @@ EOF
355
366
 
356
367
  record = {title: @active_heading + ' #' + newtagline,
357
368
  url: [@base_url, File.basename(@filename)[/.*(?=\.\w+)/],
358
- URI.escape(@active_heading)].join('/')}
369
+ URI.escape(@active_heading.gsub(/ /, '_'))].join('/')}
359
370
  @dx.create record
360
371
  @dxtags.add record
361
372
 
@@ -377,6 +388,8 @@ EOF
377
388
 
378
389
  def update_index(rx, tagline1, active_heading=nil)
379
390
 
391
+ puts ('rx: ' + rx.inspect).debug if @debug
392
+
380
393
  title, tagline2 = rx.title.split(/\s+#/)
381
394
  active_heading ||= title
382
395
 
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wiki_md
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 0.7.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
@@ -35,7 +35,7 @@ cert_chain:
35
35
  nEQURKgvgTAqVg9tuqcjEE861mSCPc+12rmUHVBZDxMDQF6CQbnOxrYRIS+7fnia
36
36
  kikBQtN17cUMyGOrZTVRhVGR
37
37
  -----END CERTIFICATE-----
38
- date: 2019-01-05 00:00:00.000000000 Z
38
+ date: 2019-01-06 00:00:00.000000000 Z
39
39
  dependencies:
40
40
  - !ruby/object:Gem::Dependency
41
41
  name: dxsectionx
metadata.gz.sig CHANGED
Binary file