hutch-xamplr 1.0.1 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,4 +1,4 @@
1
1
  ---
2
- :patch: 1
2
+ :patch: 2
3
3
  :major: 1
4
4
  :minor: 0
@@ -343,7 +343,12 @@ module XamplGenerator
343
343
 
344
344
  def Generator.choose_names(original_name, attr_prefix="_", attr_suffix="_")
345
345
 
346
- name = original_name.gsub(/[^a-zA-Z_]+/, "_")
346
+ # name = original_name.gsub(/[^a-zA-Z_]+/, "_")
347
+
348
+ # NOTE (2009-04-16) -- if tag starts with a number, prefix it with an 'x'
349
+ name = original_name.sub(/^([0-9])/) { | m | "x" + m }
350
+ name = name.gsub(/[^a-zA-Z0-9_]+/, "_")
351
+
347
352
 
348
353
  attr_name = name.gsub(/[A-Z]+/, "_\\&")
349
354
  attr_name.gsub!(/__+/, "_")
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hutch-xamplr
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bob Hutchison
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-04-15 00:00:00 -07:00
12
+ date: 2009-04-16 00:00:00 -07:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency