wiki_md 0.8.8 → 0.8.9

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: bb07bc6df7d5c864a4aaabd6c3363b51647199ad6b2dcd8476926781ea49ff99
4
- data.tar.gz: 9c0fe45b98a505fb8f3aa82f779b26290e698d586d05b33b2236059d34ff2400
3
+ metadata.gz: e841cd7128d04ee3454342a069cd02ea5364abb276b5c476753959a020ecaa56
4
+ data.tar.gz: 2ee8c71ef240fc8de1543fd54a0b4558a96b58a82d726efb8062571af081a1f8
5
5
  SHA512:
6
- metadata.gz: 06d7d791a29317e5bb060d368ba3710edd94acfe0e622b031dc9ab9d96489713a56c3560e7133a3416a692b88537b7a52d50cd43624162dd431708ba360dd130
7
- data.tar.gz: af688d05d346867bb1071042349807997c0819448e0f194249eb54473d6c7564be751d83bda2c909441d057f99faf6243da87a5a31b62b74689071cec7ad44e3
6
+ metadata.gz: 1408d70a74e0a6b2b08cc58818c316b8507d77f9eb7dc8cc929e6185df16116d6095f9ba607da72760f2dc2a290d0b6cf01991d0e4408b28be217f2dd5d74f3d
7
+ data.tar.gz: d7ff20686cdef5abf209d17d8bf46cf7c101ce3a26c14668a6b7711bd07258e8c3889e63bff9fecb6a592868fa4366cc9c15abc7a0c0e8f3a4d7078bfa074650
checksums.yaml.gz.sig CHANGED
Binary file
data/lib/wiki_md.rb CHANGED
@@ -9,7 +9,6 @@ require 'dynarex-tags'
9
9
  class WikiMdReadError < Exception
10
10
  end
11
11
 
12
-
13
12
  class WikiMd
14
13
  include RXFHelperModule
15
14
  using ColouredText
@@ -99,9 +98,7 @@ class WikiMd
99
98
  .join("\n").debug
100
99
  puts ('file exists? ' + FileX.exists?(File.dirname(s)).inspect).debug
101
100
 
102
- end
103
-
104
-
101
+ end
105
102
 
106
103
  if type == :unknown and s.lines.length == 1 then
107
104
 
@@ -130,7 +127,6 @@ class WikiMd
130
127
  validate(s)
131
128
  end
132
129
 
133
-
134
130
 
135
131
  raise WikiMdReadError, msg unless valid
136
132
 
@@ -248,7 +244,7 @@ class WikiMd
248
244
  def find(q, exact_match: false)
249
245
 
250
246
  puts ('WikiMd::find q: ' + q.inspect).debug if @debug
251
- return Entry.new(@dxsx.dx.find q) if q =~ /^\d+$/
247
+ return Entry.new(@dxsx.dx.find(q), debug: @debug) if q =~ /^\d+$/
252
248
 
253
249
  regex = if q.is_a?(String) then
254
250
  q.gsub!(/_/,' ')
@@ -267,7 +263,7 @@ class WikiMd
267
263
  return unless r
268
264
 
269
265
  heading2 = r.x.lines.last[/(?<=redirect ).*/]
270
- heading2 ? find(heading2) : Entry.new(r)
266
+ heading2 ? find(heading2) : Entry.new(r, debug: @debug)
271
267
 
272
268
  end
273
269
 
@@ -462,11 +458,10 @@ EOF
462
458
  .gsub(/-{2,}/,'-').gsub(/^-|-$/,'')]
463
459
  end
464
460
 
465
- OpenStruct.new(heading: key + " (#{value.length})", body: body.join("\n"))
461
+ OpenStruct.new(heading: key + " (#{value.length})",
462
+ body: body.join("\n"), tag_goto: true)
466
463
 
467
- end
468
-
469
-
464
+ end
470
465
 
471
466
  end
472
467
 
@@ -481,8 +476,10 @@ EOF
481
476
 
482
477
  e = Rexle::Element.new('panel')
483
478
  e.add_attribute(title: x.heading)
479
+ e.add_attribute(class: 'entry') unless x.respond_to? :tag_goto
484
480
  puts 'x.body: ' + x.body.inspect if @debug
485
- body = "<body>%s</body>" % Martile.new(x.body, ignore_domainlabel: @domain).to_html
481
+ body = "<body>%s</body>" % \
482
+ Martile.new(x.body, ignore_domainlabel: @domain).to_html
486
483
  Rexle.new(body).root.elements.each {|element| e.add element }
487
484
 
488
485
  doc.root.add e
@@ -534,6 +531,8 @@ EOF
534
531
 
535
532
  puts ' q: ' + q.inspect if @debug
536
533
  @section = r = find(q)
534
+ puts 'r: ' + r.inspect if @debug
535
+
537
536
  return false unless r
538
537
 
539
538
  content = val =~ /# / ? val : r.x.lines.first + "\n" + val
@@ -553,12 +552,14 @@ EOF
553
552
  content + "\n\n+ " + tagline1
554
553
  end
555
554
 
555
+ puts 's2: ' + s2.inspect if @debug
556
556
  r.x = s2
557
557
 
558
558
  if rx then
559
559
 
560
560
  # update the index entry if the title or tags have been modified
561
561
 
562
+ puts 'before update_index' if @debug
562
563
  update_index(rx, tagline1, @active_heading)
563
564
 
564
565
 
@@ -566,6 +567,8 @@ EOF
566
567
 
567
568
  # create a new index entry
568
569
 
570
+ puts 'before new index entry' if @debug
571
+
569
572
  newtagline = if tagline1 then
570
573
  tagline1.split.join(' #')
571
574
  else
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.8.8
4
+ version: 0.8.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
@@ -35,7 +35,7 @@ cert_chain:
35
35
  N5hZmnA6M2h3NysLCPRtwS2vMJh8qq6OS5RjU9cc5V08vyIkQ7/YC/x+7kLm5Kn0
36
36
  kvoWXxa8gpUBS+qMlSYFDHlq
37
37
  -----END CERTIFICATE-----
38
- date: 2020-04-18 00:00:00.000000000 Z
38
+ date: 2020-04-20 00:00:00.000000000 Z
39
39
  dependencies:
40
40
  - !ruby/object:Gem::Dependency
41
41
  name: dxsectionx
metadata.gz.sig CHANGED
@@ -1,2 +1,2 @@
1
- _ 1���$��F�9Ū�Ӱc,�M>��O��8{
2
- ��fnG���)Z*�c-ds.<|o��w�zB�ϳ���ʞ?�����w����>�(���w� ��=�(�Mݺ�բ=�������AG�<�4�9;R�i���
1
+ ����"
2
+ I"��