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 +4 -4
- data/README +3 -3
- data/lib/pangrid/clues.rb +5 -4
- data/lib/pangrid/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c19af70e20d2a388957adc1113e15c319ba1a35921a7a3f32789a0ba2c2e8e22
|
|
4
|
+
data.tar.gz: 290cae845c2fdb8b2198a25bcf3a6a58dcf26fa7e9ca1416caf0d443e8cb1f72
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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
|
|
40
|
-
missing or extra clues are reported as an error.
|
|
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
|
|
15
|
-
#
|
|
16
|
-
#
|
|
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
|
data/lib/pangrid/version.rb
CHANGED