Skip to content

Commit

Permalink
Added an "embed" arg.
Browse files Browse the repository at this point in the history
  • Loading branch information
icculus committed Jan 25, 2002
1 parent a491801 commit 6bfe32b
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions IcculusFinger_daemon.pl
Expand Up @@ -25,6 +25,7 @@
# 2.0.0 : Rewrite into an actual finger daemon. MILLIONS of changes.
# 2.0.1 : Fixed > and < conversion.
# MUCH better Lynx support (thanks, Chunky_Ks)
# Added an "embed" arg.
#-----------------------------------------------------------------------------

# TODO: Let [img] tags nest inside [link] tags.
Expand Down Expand Up @@ -217,6 +218,7 @@
my $archive_time = undef;
my $list_sections = 0;
my $list_archives = 0;
my $embed = 0;

my $did_output_start = 0;
sub output_start {
Expand All @@ -226,7 +228,7 @@ sub output_start {

$did_output_start = 1;

print <<__EOF__;
print <<__EOF__ if not $embed;
<html>
<head>
Expand All @@ -249,6 +251,8 @@ sub output_ending {
print(" </pre>\n");
}

return if $embed;

if ($do_html_formatting) {
print <<__EOF__;
Expand Down Expand Up @@ -318,6 +322,10 @@ sub parse_args {
$list_archives = $2;
}

if ($args =~ s/(\A|&)embed=(.*?)(&|\Z)/$1/) {
$embed = $2;
}

return($args);
}

Expand Down Expand Up @@ -665,7 +673,8 @@ sub do_fingering {
}

if ($do_html_formatting and ($browser =~ /Lynx/)) {
# !!! FIXME: executable regexp suck.
# !!! FIXME: executable regexps suck.
# !!! FIXME: This doesn't work very well.
1 while ($output_text =~ s/^( +)/"&nbsp;" x length($1)/mse);
1 while ($output_text =~ s/\r//s);
1 while ($output_text =~ s/\n/<br>/s);
Expand Down

0 comments on commit 6bfe32b

Please sign in to comment.