pangrid 0.6.0 → 0.6.1

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: bae2448ff977c9e56ef72dbab05adaaafe6ce7014b98efa76dc58b31405a2d5f
4
- data.tar.gz: bed5ea209d24fa963dc2c77815e77dc8c519d041c0936b45a9b49adf257d50a3
3
+ metadata.gz: c19af70e20d2a388957adc1113e15c319ba1a35921a7a3f32789a0ba2c2e8e22
4
+ data.tar.gz: 290cae845c2fdb8b2198a25bcf3a6a58dcf26fa7e9ca1416caf0d443e8cb1f72
5
5
  SHA512:
6
- metadata.gz: 67db80faa5ab209c14991387b3fe7eebd837fc0fc0cdb5adb9cf9d27e1261a56a07f82dc0e5274587ac9b1b088f42fc518ed7649ca6c61ad224add01c13dfcce
7
- data.tar.gz: f7a5f9c50dbd853e24609385e9f06eac8dc7ebe4ea04a654885d6768e9f53bc3e59c1c0392808c707b830a0e4b4e721acc39d9ac9d465c87b03df4024c72b958
6
+ metadata.gz: 4b84042d3429cb7c88048e72a3062a6b836fa3a45113b70f26225377ca6bdf84cd9bbe1f2d9c50fa357535bf7c4074c3a398d9d8ea8cdeea575ea8d830a111d2
7
+ data.tar.gz: 5a5dd9b64540ac12bc9e94d2d4ce05abb9481c20591cd3452dd3308b762ae1866295d88b859929d828dca81ddccdc799384955b63cb5a59d229b78fea51f1be3
data/README CHANGED
@@ -36,6 +36,6 @@ Clues file format (-c):
36
36
 
37
37
  Every clue starts with its number, which is used to match it to the grid, so
38
38
  the clues can be in any order. Numbers may be decorated ("7.", "**7.**",
39
- "7)"). Blank lines are ignored. The clue numbers must match the grid exactly;
40
- missing or extra clues are reported as an error. The clues replace any that
41
- were already in the input file.
39
+ "7)"). Blank lines and lines starting with # are ignored. The clue numbers
40
+ must match the grid exactly; missing or extra clues are reported as an error.
41
+ The clues replace any that were already in the input file.
data/lib/pangrid/clues.rb CHANGED
@@ -11,9 +11,10 @@
11
11
  # 1 Power to limit a settlement (8)
12
12
  #
13
13
  # Section headers are "Across" and "Down" (case insensitive, optionally
14
- # decorated, e.g. "**Across**" or "Across:"). Blank lines are ignored. Each
15
- # clue starts with its number, which is used to match it to the grid, so the
16
- # clues don't have to be in order.
14
+ # decorated, e.g. "**Across**" or "Across:"). Blank lines, and comment lines
15
+ # starting with a # (qxw adds a comment header to its answer files), are
16
+ # ignored. Each clue starts with its number, which is used to match it to the
17
+ # grid, so the clues don't have to be in order.
17
18
 
18
19
  module Pangrid
19
20
 
@@ -39,7 +40,7 @@ class ClueList
39
40
  section = nil
40
41
  data.each_line.with_index(1) do |line, lineno|
41
42
  line = line.strip
42
- next if line.empty?
43
+ next if line.empty? || line.start_with?("#")
43
44
  if (m = line.match(HEADER))
44
45
  section = m[1].downcase == "across" ? across : down
45
46
  next
@@ -1,3 +1,3 @@
1
1
  module Pangrid
2
- VERSION='0.6.0'
2
+ VERSION='0.6.1'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pangrid
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Martin DeMello