/[pub]/suikawiki/script/misc/plugins/link/map.wp2
Suika

Diff of /suikawiki/script/misc/plugins/link/map.wp2

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

revision 1.4 by wakaba, Wed Feb 18 07:22:11 2004 UTC revision 1.5 by wakaba, Thu Mar 11 08:06:09 2004 UTC
# Line 87  FormattingRule: Line 87  FormattingRule:
87        next unless $_->[0];        next unless $_->[0];
88        last if $i++ == $p->{n};        last if $i++ == $p->{n};
89                
       my $li = $list->append_new_node  
                         (type => '#element',  
                          namespace_uri => $NS_XHTML1,  
                          local_name => 'li');  
90        $WIKILINKING->to_wikipage_in_html ({        $WIKILINKING->to_wikipage_in_html ({
91          label => $p->{template},          label => $p->{template},
92        } => {        } => {
# Line 101  FormattingRule: Line 97  FormattingRule:
97          page_lastmodified => $_->[1],          page_lastmodified => $_->[1],
98        }, {        }, {
99          o => $o,          o => $o,
100          parent => $li,          parent => $list->append_new_node
101                            (type => '#element',
102                             namespace_uri => $NS_XHTML1,
103                             local_name => 'li'),
104        });        });
105      }      }
106    
# Line 152  FormattingRule: Line 151  FormattingRule:
151                                     -recursive => $p->{recursive})) {                                     -recursive => $p->{recursive})) {
152          last if $i++ == $p->{n};          last if $i++ == $p->{n};
153                    
         my $li = $list->append_new_node  
                           (type => '#element',  
                            namespace_uri => $NS_XHTML1,  
                            local_name => 'li');  
154          $WIKILINKING->to_wikipage_in_html ({          $WIKILINKING->to_wikipage_in_html ({
155            label => $p->{template},            label => $p->{template},
156          } => {          } => {
# Line 164  FormattingRule: Line 159  FormattingRule:
159            wiki_mode => $p->{mode},            wiki_mode => $p->{mode},
160          }, {          }, {
161            o => $o,            o => $o,
162            parent => $li,            parent => $list->append_new_node
163                              (type => '#element',
164                               namespace_uri => $NS_XHTML1,
165                               local_name => 'li'),
166          });          });
167        }        }
168      } catch SuikaWiki::DB::Util::Error with {      } catch SuikaWiki::DB::Util::Error with {
# Line 196  FormattingRule: Line 194  FormattingRule:
194            $err->throw if $err->{-type} eq 'ERROR_REPORTED';            $err->throw if $err->{-type} eq 'ERROR_REPORTED';
195            $content = undef;            $content = undef;
196          };          };
197          $content = $p->{case_sensible} ? $content : lc $content;          $content = $p->{case_sensitive} ? $content : lc $content;
198          $content =~ s/^[^\x0A\x0D]+[\x0D\x0A]+//s;          $content =~ s/^[^\x0A\x0D]+[\x0D\x0A]+//s;
199          $page = $o->{wiki}->name ($page);          $page = $o->{wiki}->name ($page);
200          my $n_page = $page->stringify (wiki => $o->{wiki});          my $n_page = $page->stringify (wiki => $o->{wiki});
# Line 216  FormattingRule: Line 214  FormattingRule:
214              map {$_->[0]->stringify (wiki => $o->{wiki}, delimiter => "\x1D")              map {$_->[0]->stringify (wiki => $o->{wiki}, delimiter => "\x1D")
215                   ."\x1F".$_->[1]} @r;                   ."\x1F".$_->[1]} @r;
216        $o->{wiki}->{db}->set (m__search_result => [$word] => $sr);        $o->{wiki}->{db}->set (m__search_result => [$word] => $sr);
217  ## TODO: Cache & case-sensibility  ## TODO: Cache & case-sensitivility
218      } else {      } else {
219        @r = map {[$o->{wiki}->name ($_->[0], delimiter_reg => qr/\x1D/), $_->[1]]}        @r = map {[$o->{wiki}->name ($_->[0], delimiter_reg => qr/\x1D/), $_->[1]]}
220             map {[split /\x1F/, $_, 2]} split /\x1E/, $sr;             map {[split /\x1F/, $_, 2]} split /\x1E/, $sr;
# Line 231  FormattingRule: Line 229  FormattingRule:
229            (name => 'Link:toWikiPage:SourceLabelLong:SearchResult',            (name => 'Link:toWikiPage:SourceLabelLong:SearchResult',
230             wiki => $o->{wiki}, o => $o);             wiki => $o->{wiki}, o => $o);
231        for (@r) {        for (@r) {
         my $li = $list->append_new_node  
                           (type => '#element',  
                            namespace_uri => $NS_XHTML1,  
                            local_name => 'li');  
232          $WIKILINKING->to_wikipage_in_html ({          $WIKILINKING->to_wikipage_in_html ({
233            label => $p->{template},            label => $p->{template},
234          } => {          } => {
# Line 243  FormattingRule: Line 237  FormattingRule:
237            wiki_mode => $p->{mode},            wiki_mode => $p->{mode},
238          }, {          }, {
239            o => $o,            o => $o,
240            parent => $li,            parent => $list->append_new_node
241                              (type => '#element',
242                               namespace_uri => $NS_XHTML1,
243                               local_name => 'li'),
244            -m__weight => $_->[1],            -m__weight => $_->[1],
245          });          });
246        }        }

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24