Changeset 3540 for trunk/gsdl/perllib/plugins/BibTexPlug.pm
- Timestamp:
- 2002-11-18T17:43:56+13:00 (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/perllib/plugins/BibTexPlug.pm
r3426 r3540 51 51 } 52 52 53 my $arguments = 54 [ { 'name' => "process_exp", 55 'desc' => "A perl regular expression to match against filenames. Matching filenames will be processed by this plugin. Each plugin has its own default process_exp. e.g HTMLPlug defaults to '(?i)\.html?\$' i.e. all documents ending in .htm or .html (case-insensitive).", 56 'type' => "string", 57 'reqd' => "no" , 58 'deft' => q^(?i)\.bib$^ } 59 ]; 60 61 my $options = 62 { 'name' => "BibTexPlug", 63 'desc' => "BibTexPlug reads bibliography files in BibTex format. BibTexPlug creates a document object for every reference a the file. It is a subclass of SplitPlug, so if there are multiple records, all are read.", 64 'inherits' => "Yes", 65 'args' => $arguments }; 66 53 67 # This plugin processes files with the suffix ".bib" 54 68 sub get_default_process_exp { … … 59 73 sub get_default_split_exp { 60 74 return q^\n+(?=@)^; 75 } 76 sub new { 77 my $class = shift (@_); 78 my $self = new SplitPlug ($class, @_); 79 # 14-05-02 To allow for proper inheritance of arguments - John Thompson 80 my $option_list = $self->{'option_list'}; 81 push( @{$option_list}, $options ); 82 return bless $self, $class; 61 83 } 62 84 … … 368 390 369 391 $text =~ s/([\w\d\.\-]+@[\w\d\.\-]+)/<a href=\"mailto:$1\">$1<\/a>/g; 370 $text =~ s/(http:\/\/[\w\d\.\-]+[\/\w\d\.\-]*)/<a href=\"$1 ">$1<\/a>/g;392 $text =~ s/(http:\/\/[\w\d\.\-]+[\/\w\d\.\-]*)/<a href=\"$1\">$1<\/a>/g; 371 393 372 394 return $text;
Note:
See TracChangeset
for help on using the changeset viewer.