projects
/
idzebra-moved-to-github.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
4f992a1
)
Do not print meta section for empty titles
author
Adam Dickmeiss
<adam@indexdata.dk>
Fri, 14 Jan 2005 09:52:42 +0000
(09:52 +0000)
committer
Adam Dickmeiss
<adam@indexdata.dk>
Fri, 14 Jan 2005 09:52:42 +0000
(09:52 +0000)
test/dmoz/con1.pl
patch
|
blob
|
history
diff --git
a/test/dmoz/con1.pl
b/test/dmoz/con1.pl
index
d2591c3
..
906eb27
100755
(executable)
--- a/
test/dmoz/con1.pl
+++ b/
test/dmoz/con1.pl
@@
-2,7
+2,7
@@
my $state = 'init';
my $topic = '';
my $state = 'init';
my $topic = '';
-my $title;
+my $title = '';
my $description;
while ($_ = <STDIN>) {
my $description;
while ($_ = <STDIN>) {
@@
-19,11
+19,14
@@
while ($_ = <STDIN>) {
$description = $1;
}
elsif (/<\/ExternalPage>/) {
$description = $1;
}
elsif (/<\/ExternalPage>/) {
- print "<meta>\n";
- print " <title>$title</title>\n";
- print " <description>$description</description>\n";
- print " <url>$url</url>\n";
- print " <topic>$topic</topic>\n";
- print "</meta>\n";
+ if (length($title) > 0)
+ {
+ print "<meta>\n";
+ print " <title>$title</title>\n";
+ print " <description>$description</description>\n";
+ print " <url>$url</url>\n";
+ print " <topic>$topic</topic>\n";
+ print "</meta>\n";
+ }
}
}
}
}