md2review 1.5.0 → 1.6.0

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: 2d8b18e0e9542e371228ec43dc79fd5e91ebfc80
4
- data.tar.gz: 5596daa94be80f6eb847003ebf0d96780c090b84
3
+ metadata.gz: 0c33fd9405522deed97226f68c102915fc82a265
4
+ data.tar.gz: 16c2bf470421be818b4880b60b6f90f1f4620018
5
5
  SHA512:
6
- metadata.gz: 289771273affbc3a4c597297c91f120662ddeb79e9eb87cf6887bc2bcd77b387deebb2f9aacd1a8e971d0b2c54f370bb45bdc59632fd2f42d25f6f11fe3504cf
7
- data.tar.gz: 242562c5061128eb046ddf80b998662dc787c1cb7a8f3257653ab65e38d7a4406501bdd969b293f0330f55a439ed6553041af3ab2ec8eb0bfdf866b3e4bcf191
6
+ metadata.gz: be1a2406bb5dd4e9602839c80c3fc2c16f11bfd785565f1dc2e4045138fe86756399a167be20e8d6fad7863dc26c5d0a452b72154e409c2140b4b887806ed025
7
+ data.tar.gz: f429bbc5a6020373cb03035175f20a8fa4097e24b9f475ec2c58dd50d8ce0001dc05e24833c78690176b2340afd8e437b3d49a8fe401886d3f376b792564e190
data/README.md CHANGED
@@ -27,6 +27,9 @@ You can use the commmand md2review as:
27
27
 
28
28
  ## History
29
29
 
30
+ * 1.6.0
31
+ * special attribute in header need a separator(U+0020) to distinguish from Re:VIEW inline markup
32
+ (reported by @himajin315 and @yasulab)
30
33
  * 1.5.0
31
34
  * support language on code block
32
35
  * add option --render-enable-cmd
@@ -1,3 +1,3 @@
1
1
  module MD2ReVIEW
2
- VERSION = "1.5.0"
2
+ VERSION = "1.6.0"
3
3
  end
@@ -71,7 +71,7 @@ module Redcarpet
71
71
 
72
72
  def header(title, level, anchor="")
73
73
  buf = ""
74
- if /\s*(\{.*?\})\s*$/ =~ title
74
+ if /\s+(\{.*?\})\s*$/ =~ title
75
75
  buf << "\n#@# header_attribute: #{$1}"
76
76
  title = $`
77
77
  end
data/test/review_test.rb CHANGED
@@ -57,6 +57,12 @@ class ReVIEWTest < Test::Unit::TestCase
57
57
  assert_equal "\n\#@# header_attribute: {-}\n= AAA\n\n\#@# header_attribute: {\#foo .bar title=hoge}\n= BBB\n", @markdown.render("\#AAA {-}\n\n\#BBB {\#foo .bar title=hoge}\n\n")
58
58
  end
59
59
 
60
+ def test_header_attributes_without_space
61
+ assert_respond_to @markdown, :render
62
+ assert_equal "\n\#@# header_attribute: {-}\n= AAA\n\n\= BBB@<tt>{test}\n",
63
+ @markdown.render("\#AAA {-}\n\n\#BBB@<tt>{test}\n\n")
64
+ end
65
+
60
66
  def test_image
61
67
  assert_equal "\n\n//image[image][test]{\n//}\n\n\n", @markdown.render("![test](path/to/image.jpg)\n")
62
68
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: md2review
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.0
4
+ version: 1.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - takahashim
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-03-12 00:00:00.000000000 Z
11
+ date: 2015-04-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: redcarpet