/[papo]/papo/neb/neb/Tree/Tag.pm
ViewVC logotype

Diff of /papo/neb/neb/Tree/Tag.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1 by jlenton, Mon Apr 7 18:02:43 2003 UTC revision 1.2 by jlenton, Tue Apr 8 00:23:11 2003 UTC
# Line 81  sub canonical_start Line 81  sub canonical_start
81  {  {
82      my $self = shift;      my $self = shift;
83      my %h = $self->attributes;      my %h = $self->attributes;
84      return join('',  
85        return  join('',
86                  '<', $self->name,                  '<', $self->name,
87                  map(" $_='$h{$_}'", sort $attr_sorter keys %h), '>');                  map(" $_='\Q$h{$_}\E'", sort $attr_sorter keys %h), '>');
88  }  }
89    
90  sub canonical_end  sub canonical_end
# Line 96  sub canonical_end Line 97  sub canonical_end
97  sub code_start  sub code_start
98  {  {
99      my $self = shift;      my $self = shift;
100        my %h = $self->attributes;
101        my $code = '$OUTPUT .= "<' . $self->name;
102    
103      return sprintf ("\$OUTPUT .= \"%s\";\n",      foreach (keys %h)
104                      quotemeta $self->canonical_start);      {
105            if ($h{$_} =~ /^neb:(.*)$/)
106            {
107                $code .= sprintf ' %s=\" . %s . \"', $_, $1;
108            }
109            else
110            {
111                $code .= " $_=\\\"\Q$h{$_}\E\\\"";
112            }
113        }
114                              
115        $code .= ">\"; \# Tag::code_start\n";
116    
117        return $code;
118  }  }
119    
120  sub code_end  sub code_end
# Line 106  sub code_end Line 122  sub code_end
122      my $self = shift;      my $self = shift;
123    
124      return sprintf ("\$OUTPUT .= \"%s\";\n",      return sprintf ("\$OUTPUT .= \"%s\";\n",
125                      quotemeta $self->canonical_end);                      $self->canonical_end);
126  }  }
127    
128  sub code  sub code

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26