pdd 0.7.2 → 0.7.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/lib/pdd/source.rb CHANGED
@@ -73,7 +73,7 @@ module PDD
73
73
  begin
74
74
  tail = tail(lines, match[1])
75
75
  rescue Error => ex
76
- raise Error, "#{ex.message} line ##{idx}"
76
+ raise Error, "#{ex.message} in line ##{idx}"
77
77
  end
78
78
  body = (match[3] + ' ' + tail.join(' ')).gsub(/\s+/, ' ').strip
79
79
  Puzzle.new(
@@ -90,7 +90,7 @@ module PDD
90
90
  lines
91
91
  .take_while { |txt| txt.start_with?(prefix) }
92
92
  .map { |txt| txt[prefix.length, txt.length] }
93
- .take_while { |txt| txt =~ /^[ a-zA-Z0-9\-_]/ }
93
+ .take_while { |txt| txt =~ /^[ a-zA-Z0-9]/ }
94
94
  .each { |txt| fail Error, 'Space expected' unless txt.start_with?(' ') }
95
95
  .each { |txt| fail Error, 'Too many spaces' if txt =~ /^\s{2,}/ }
96
96
  .map { |txt| txt[1, txt.length] }
data/lib/pdd/version.rb CHANGED
@@ -26,5 +26,5 @@
26
26
  # Copyright:: Copyright (c) 2014 Yegor Bugayenko
27
27
  # License:: MIT
28
28
  module PDD
29
- VERSION = '0.7.2'
29
+ VERSION = '0.7.3'
30
30
  end
data/test/test_source.rb CHANGED
@@ -38,6 +38,7 @@ class TestSources < Minitest::Test
38
38
  '
39
39
  * @todo #44 hello,
40
40
  * how are you doing?
41
+ * -something else
41
42
  Something else
42
43
  ~~ @todo #ABC-3 this is another puzzle
43
44
  ~~ and it also has to work
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pdd
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.2
4
+ version: 0.7.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: