correspondence-markup 0.1.1 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -62,14 +62,12 @@ grammar CorrespondenceMarkupLanguage
62
62
  end
63
63
 
64
64
  rule item
65
- "[" id:item_id S text:text "]"
65
+ "[" id:item_ids S text:text "]"
66
66
  {
67
67
  def value(group_id = "")
68
- item_id = id.text_value
69
- if !item_id.match(/[A-Z]/)
70
- item_id = group_id + item_id
71
- end
72
- CorrespondenceMarkup::Item.new(item_id, text.value)
68
+ item_ids = id.text_value.split(",")
69
+ item_ids = item_ids.map { |item_id| item_id.match(/[A-Z]/) ? item_id : group_id + item_id}
70
+ CorrespondenceMarkup::Item.new(item_ids.join(","), text.value)
73
71
  end
74
72
  }
75
73
  end
@@ -82,6 +80,10 @@ grammar CorrespondenceMarkupLanguage
82
80
  end
83
81
  }
84
82
  end
83
+
84
+ rule item_ids
85
+ item_id ("," item_id)*
86
+ end
85
87
 
86
88
  rule item_id
87
89
  [A-Z]* [0-9]+
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: correspondence-markup
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.2.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-07-05 00:00:00.000000000 Z
12
+ date: 2013-07-10 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: Use to generate HTML pages containing structure groups, structures and
15
15
  items as used by correspondence.js.
@@ -38,7 +38,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
38
38
  version: '0'
39
39
  segments:
40
40
  - 0
41
- hash: 332006513
41
+ hash: -1007145873
42
42
  required_rubygems_version: !ruby/object:Gem::Requirement
43
43
  none: false
44
44
  requirements: