w2tags 0.9.60 → 0.9.61

Sign up to get free protection for your applications and to get access to all the features.
data/doc/History.rdoc CHANGED
@@ -2,6 +2,49 @@
2
2
 
3
3
  Below is a complete listing of changes for each revision of W2TAGS.
4
4
 
5
+ == 0.9.61
6
+
7
+ === Parser
8
+
9
+ ==== Parsing "Key-Attribute" change the sequence parsing from left to right
10
+ from attribute "name(:)","id(#)","class(.)","constanta(&)". After parsing
11
+ we have a list of Var-Constanta in HOT with value
12
+
13
+ Example:
14
+
15
+ %div&joel:name#id.class&constanta{op="atribute"}== info
16
+
17
+ $$ => All Key-Attribute before Custome-Attribute ( :name#id.class&constanta )
18
+ $@ => All Key-Attribute from Custome-Attribute ( {op="atribute"}== )
19
+ $: => name-Variable ( :name )
20
+ $# => id-Variable ( #id )
21
+ $. => class-Variable ( .class )
22
+ $& => Constanta-Variable ( &joel )
23
+ *: => name-Value ( name )
24
+ *# => id-Value ( id )
25
+ *. => class-Value ( class )
26
+ *& => constanta-Value ( joel )
27
+ *@ => attribute ( op="atribute" )
28
+ *name* => name-attribute ( name="name" )
29
+ *id* => id-attribute ( id="id" )
30
+ *class*=> class-attribute ( class="class" )
31
+ *att* => attribute ( op="atribute" )
32
+ *all* => all-attribute ( name="name" id="id" class="class" op="atribute" )
33
+
34
+ to passing All Key-Attribute like example
35
+
36
+ OLD:
37
+ ~~~~
38
+ %div$$
39
+
40
+ NEW:
41
+ ~~~~
42
+ %div$$$@
43
+
44
+ and we will have a nice interpolation like code below:
45
+
46
+ %div$$&rec$@
47
+
5
48
  == 0.9.52
6
49
 
7
50
  === Parser
data/lib/w2tags/parser.rb CHANGED
@@ -624,15 +624,9 @@ module W2Tags
624
624
  @mem_var['*class*']= ''
625
625
  @mem_var['*code*' ]= ''
626
626
  #p keys
627
- if @key.gsub!(/([&:#.=])([\/\t\w\-#.= ]*$)/,'')
627
+ if @key.gsub!(/([:#.&=])([\/\t\w\-#.&= ]*$)/,'')
628
628
  keys = $1+$2
629
629
  @mem_var['$$'] = keys.clone
630
- if keys.gsub!(/^&([\/\w\-.]*)/,'')
631
- if $1!=''
632
- @mem_var['$&' ] = "&#{$1}"
633
- @mem_var['*&' ] = $1
634
- end
635
- end
636
630
  if keys.gsub!(/^:([\w\-.]*)/,'')
637
631
  if $1!=''
638
632
  @mem_var['$:' ] = ":#{$1}"
@@ -659,18 +653,23 @@ module W2Tags
659
653
  @mem_var['*all*' ]<< "class=\"#{cx}\" "
660
654
  end
661
655
  end
656
+ if keys.gsub!(/^&([\/\w\-.]*)/,'')
657
+ if $1!=''
658
+ @mem_var['$&' ] = "&#{$1}"
659
+ @mem_var['*&' ] = $1
660
+ end
661
+ end
662
662
  @key << keys
663
663
  end
664
- @mem_var['$$' ] << @mem_var['$@']
665
664
  @mem_var['*all*'] << @mem_var['*@']
666
665
  @mem_var['*att*'] = @mem_var['*@']
667
666
  if @key[0,1]!='='
668
667
  if @key.gsub!(/==$/,'')
669
668
  @mem_var['*code*'] = '<%= "$*" %>'
670
- @mem_var['$$' ]<< "=="
669
+ @mem_var['$@']<< "=="
671
670
  elsif @key.gsub!(/=$/,'')
672
671
  @mem_var['*code*'] = "<%= $* %>"
673
- @mem_var['$$' ]<< "="
672
+ @mem_var['$@']<< "="
674
673
  end
675
674
  end
676
675
  end
data/tasks/setup.rb CHANGED
@@ -17,7 +17,7 @@ PROJ = OpenStruct.new(
17
17
  :authors => 'Widi Harsojo',
18
18
  :email => 'wharsojo@gmail.com',
19
19
  :url => "\000",
20
- :version => ENV['VERSION'] || '0.9.60',
20
+ :version => ENV['VERSION'] || '0.9.61',
21
21
  :exclude => %w(tmp$ bak$ ~$ CVS \.svn/ \.git/ ^pkg/),
22
22
  :release_name => ENV['RELEASE'],
23
23
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: w2tags
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.60
4
+ version: 0.9.61
5
5
  platform: ruby
6
6
  authors:
7
7
  - widi harsojo
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-12-11 00:00:00 +07:00
12
+ date: 2009-12-14 00:00:00 +07:00
13
13
  default_executable:
14
14
  dependencies: []
15
15