martile 0.6.35 → 0.6.36

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: 9c7a521f210c32682700b5a2409ea43aef6b3d16
4
- data.tar.gz: a277842c8bccb68f29f02f24c7231edf2b031909
3
+ metadata.gz: 2babcb4af6b1c90849039f76e59037d11f46a9c2
4
+ data.tar.gz: 456642657af1621bcb641b71f9b60c0c0c646f6d
5
5
  SHA512:
6
- metadata.gz: 5ca3a41fbb3a6347033a53dab71769402079881ae17975a10aacbcb5c429f8f16a5fbaaf384dda875f58a0d26a95384826cb0182e4ccf4d68f09fd8164ec1173
7
- data.tar.gz: be0d93766fe292eae5a8768e0f7f1db7d7c158730e38f9bd017386aee684a3d27327252ee915860468183de0431b74bc34ce07c2f822082657267f2ec423cac8
6
+ metadata.gz: ccdf45c7b095e647689052567c7b132b6498917c281bcd6527e668f86d225df3bfd82ff9d055707618f129488c49a3e0fad6577f33f7da1582ac803d2cbf142f
7
+ data.tar.gz: 4b31eab5617f7b4fc78c67c044d93eb92f61eba316af13e3e0d51947cb83a263d62231a2223c413ad3e6857d571f0a1eef090faf5212e70e36465ecacba89ea9
checksums.yaml.gz.sig CHANGED
Binary file
data.tar.gz.sig CHANGED
Binary file
data/lib/martile.rb CHANGED
@@ -9,6 +9,8 @@ require 'rdiscount'
9
9
  require 'kvx'
10
10
 
11
11
 
12
+ # feature: 28-May-2017 An embeded Dynarex table contents are now rendered to
13
+ # Markdown by default
12
14
  # feature: 11-Mar-2017 A details and summary tag can now be generated from +>
13
15
  # e.g.
14
16
  # !+
@@ -354,9 +356,12 @@ class Martile
354
356
 
355
357
  def dx_render_table(dx, raw_select)
356
358
 
359
+ markdown = true
360
+
357
361
  if raw_select then
358
362
  raw_fields = raw_select[/select:\s*["']([^"']+)/,1]
359
- fields = raw_fields.split(/\s*,\s*/)
363
+ fields = raw_fields.split(/\s*,\s*/) if raw_fields
364
+ markdown = false if raw_select[/\bmarkdown:\s*false\b/]
360
365
  end
361
366
 
362
367
  print_row = -> (row, widths) do
@@ -398,7 +403,8 @@ class Martile
398
403
 
399
404
  "[%s](%s)" % [url_title, col]
400
405
  else
401
- col
406
+ markdown ? RDiscount.new(col).to_html.strip.gsub("\n",'') : col
407
+
402
408
  end
403
409
 
404
410
  r
@@ -577,4 +583,4 @@ class Martile
577
583
  s.gsub(/\B(\* +)([^\n]+)\s+(https?:\/\/.*)/,'\1[\2](\3)')
578
584
 
579
585
  end
580
- end
586
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: martile
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.35
4
+ version: 0.6.36
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
@@ -31,7 +31,7 @@ cert_chain:
31
31
  ta+wi0WcePPmMfSbCGQcYixXdM6qZvflWMz0AK44eQcm6OymMXgMQG6GvHPAl6s2
32
32
  ASPGReskINIIrA==
33
33
  -----END CERTIFICATE-----
34
- date: 2017-03-11 00:00:00.000000000 Z
34
+ date: 2017-05-28 00:00:00.000000000 Z
35
35
  dependencies:
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: rdiscount
metadata.gz.sig CHANGED
Binary file